Samba - how change path to external HDD drive ?

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
User avatar
MichaIng
Site Admin
Posts: 3534
Joined: Sat Nov 18, 2017 6:21 pm

Re: Samba - how change path to external HDD drive ?

Post by MichaIng »

You changed now all modes recursively, but this is probably difficult to revert, as especially Nextcloud creates very individual modes :?. But not a big problem, webserver R/W permission is guaranteed. You may want to remove execute permissions from files:

Code: Select all

find /media/SSD -type f -exec chmod -x {} +
It would have been sufficient to change only the parent dir mode, non-recursively:

Code: Select all

chmod 0755 /media/SSD
Background is that for general access for an unprivileged user, it needs to have at least execute permission for all parent directories. And your original /mnt/SSD mode was 0750, so only www-data user and group had access. Btw, for the parent directory, root user and group should be fine, so the webserver and PHP cannot mess with what they are not supposed to touch :):

Code: Select all

chown root:root /media/SSD
Post Reply