How can I achieve this files & folders permissions scenario:
Consider these folder:
Folder A: 640 root apache /var/www/A/
Folder www: 640 root apache /var/www/
and this linux user:
id user1
: uid=1000(user1) gid=1000(user1) groups=1000(user1)
I want to allow linux user user1
read/write access JUST to folder A, BUT don't change folder A owner or group.
I have tried these scenarios but none of them were desirable:
- add
user1
to groupapache
:
cons:user1
will be able to read other files at/var/www/
. - hard-link a folder(ex. folder B) in
user1
's home to/var/www/A/
and set proper permissions on folder B rather than A:
cons: hard-links to directories not possible on cross-devices. - add
user1
tosudoers
:
cons: complexity ofuser1
, plus,user1
may broke owner/group policy and/or permissions of folder A by human-error.
any idea?
A
? That really is the best way of achieving what you want.A
@terdon because that folder is managed by another admin account & i don't have access and/or permission to change that.