2

I have installed opencart 1.5.6.1 on Digital ocean ubuntu14.04 I have used "demo" as username and login by tightvnc

opencart requird "www-data" as owner and group:

$ sudo chown -R www-data:www-data /var/www/html  
$ sudo chmod -R a=r,a+X,u+w /var/www/html
$ cd /var/www/html/ 
$ ls -la  
drwxr-xr-x+  6 www-data www-data  4096 Aug 17 07:19 catalog
-rw-r--r--+  1 www-data www-data     0 Aug 15 13:14 config-dist.php
$ sudo getfacl /var/www/html/
# file: var/www/html/
# owner: www-data
# group: www-data
user::rwx
group::r-x
other::r-x

Then I change the ACL by adding demo as owner as well:

$ sudo setfacl -R -m u:demo:rwx /var/www/html/
# file: var/www/html/
# owner: www-data
# group: www-data
user::rwx
user:demo:rwx
group::r-x
mask::rwx
other::r-x

which allowed demo the edit the files and folders in vnc.

but this has also changed the permission of those files:

$ ls -la
drwxrwxr-x+  6 www-data www-data  4096 Aug 17 07:19 catalog
-rw-rwxr--+  1 www-data www-data     0 Aug 15 13:14 config-dist.php

the group has been chhanged to rwx....

If I change the group permission by:

$ sudo chmod -R g-x /var/www/html

The ACL mask changed....

# file: var/www/html/
# owner: www-data
# group: www-data
user::rwx
user:demo:rwx                   #effective:rw-
group::r-x                      #effective:r--
mask::rw-
other::r-x

If I change the mask:

$ sudo setfacl -R -m m:rwx /var/www/html/

the group returned to rwx!

So the question is: Whenever I changed using chmod, ACL changed! When I changed using ACL, group permission changed!

It may be related to : http://www.novell.com/documentation/suse91/suselinux-adminguide/html/apbs03.html

may need to use -n

sudo setfacl -nR -m u:demo:rwx /var/www/html/

may be" The group class permission bits that would be displayed by ls -dl mydir now correspond to the mask entry."

which mean the rwx displayed is referred to the mask permission instead of the group permission

Stephen
  • 21

1 Answers1

-2

Your listing shows a + on files where you did not run getfacl, so it is hard to tell ehat really happened. Repeat with a single file and list/report state before and after and all commands.

If your promblem stays on files that did not have acls before, there is a bug in your acl implementation as I cannot repeat the problem on the reference Solaris where the old withdrawn ACL draft came from.

schily
  • 19,173