Correcting nextcloud data folder .htaccess permissions?

dbsoundman

Dabbler
Joined
Feb 20, 2021
Messages
26
Hi all, I'm a Linux guy and I'm a little lost dealing with some odd details of BSD file permissions.

I migrated all the files in the original data/ folder of my Nextcloud plugin/jail to a mount folder called nextcloud_data/ in the same path, but in the process I forgot that I was root, so the file permissions and ownership got all messed up. I managed to set all the files back to www:www ownership, but for some reason I can't get the .htaccess file in my nextcloud_data folder to have the right permissions.

Currently, it shows
Code:
-rwxr-----+

...I'm not sure why there's an extra + at the end, and no matter what I do I can't get rid of the x either. From what I understand, the permissions I need are
Code:
-rw-r-----


I've tried chmod as root, www, using 0644, o-x, u-x...no difference.

How can I get this right?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
Hi all, I'm a Linux guy and I'm a little lost dealing with some odd details of BSD file permissions.

I migrated all the files in the original data/ folder of my Nextcloud plugin/jail to a mount folder called nextcloud_data/ in the same path, but in the process I forgot that I was root, so the file permissions and ownership got all messed up. I managed to set all the files back to www:www ownership, but for some reason I can't get the .htaccess file in my nextcloud_data folder to have the right permissions.

Currently, it shows
Code:
-rwxr-----+

...I'm not sure why there's an extra + at the end, and no matter what I do I can't get rid of the x either. From what I understand, the permissions I need are
Code:
-rw-r-----


I've tried chmod as root, www, using 0644, o-x, u-x...no difference.

How can I get this right?
The + means that you have set an ACL on the path. This is unexpected because you shouldn't have changed permissions on your iocage dataset (may be indication that many other things are broken as well). getfacl is correct tool to view ACL, but repairing individual files may not be very straight-forward (damage may be widespread).
 

dbsoundman

Dabbler
Joined
Feb 20, 2021
Messages
26
The + means that you have set an ACL on the path. This is unexpected because you shouldn't have changed permissions on your iocage dataset (may be indication that many other things are broken as well). getfacl is correct tool to view ACL, but repairing individual files may not be very straight-forward (damage may be widespread).
It's not unexpected in this case; my plan was to put the user data directory for Nextcloud on a separate shared storage dataset so I could nuke the Nextcloud jail if needed and not lose that data. However now I'm wondering if that's unneeded complication.

I'm thinking I'll delete the jail later tonight and try a fresh install. What I did before was attempt to copy all the existing files from the data/ folder to the nextcloud_data/ folder (which was mounted as a shared dataset) but again, I did so as root, so I messed up the permissions. I then deleted the data/ folder so I lost my point of reference for the "right" configuration.
 
Top