chmod: invalid mode: `+a'
Solution 1
"+a" is not a standard argument, no. Follow the next step in the linked documentation.
sudo setfacl -R -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs
sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs
Info on what the "+a" does for chmods that use it:
+a The +a mode parses a new ACL entry from the next argument on the commandline and inserts it into the canonical location in the ACL. If the supplied entry refers to an identity already listed, the two entries are combined.
Solution 2
That is Mac OS X syntax. See here for proof.
Ubuntu's chmod doesn't include this option.
Related videos on Youtube
Phill Pafford
Love development with PHP/Symfony/PHPStorm, iOS, PostgreSQL, Linux flavor Ubuntu, jQuery/Mobile, Foundation CSS, GitFlow AVH and HTML5 Personal Projects are Crypto Currencies, Home Automation, Mobile development, SMS/MMS and DIY electronics via Make and Hack A Day https://keybase.io/phillpafford https://onename.com/phillpafford #bitcoin: https://www.coinbase.com/phillpafford #DogeCoin: D67fwUKwKQQeL9pdbZmbWcevuAYW8XPqyz
Updated on September 18, 2022Comments
-
Phill Pafford over 1 year
System: ( lsb_release -a )
Distributor ID: Ubuntu Description: Ubuntu 10.04.4 LTS Release: 10.04 Codename: lucid
This is my command:
sudo chmod +a "www-data allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
Docs:
Error:
chmod: invalid mode: `+a' Try `chmod --help' for more information.
Why doesn't this work? Isn't the +a standard chmod?
UPDATE:
Looks like this is a OSX only mod:
-
Daniel over 5 yearslink is here symfony.com/doc/3.4/setup/file_permissions.html HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1) sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX var sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX var