Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A bash script to automate DarwinPorts upgrades' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A bash script to automate DarwinPorts upgrades
Authored by: samual.icky on Oct 29, '05 01:30:00PM

I know I'm going to come off... well in a not so nice way but... yes he knows a+x is all. However chmod +x file will set all set the user, group and guest bits to executable as well, thus +x is the same as a+x.



[ Reply to This | # ]
"chmod +x" == "chmod a+x"
Authored by: sjk on Oct 29, '05 03:49:18PM
I appreciate your astute explanation of my pedantic remark. :-)

Personally, I prefer using chmod u+x ... just to set the user execute bit for files that are intended to only be run by the owner and/or with root access (e.g. using sudo). That preserves other mode bits, which may or may not allow others to read (but not execute) the file.

UNIX file permissions bits and ownership are generally much sloppier and harder to manage on OS X than on more traditional UNIX(ish) systems. It can have implications for security that aren't often discussed. But without specific reasons, attempting to maintain file permission integrity (beyond Repair Disk Permissions) can easily become more tediously time consuming than it's worth.

And the second paragraph of my recent "... and ACLs" post implies the near- and long-term futility of that effort, especially for non-admins and unsophisticated users likely to say "why bother?". The complexity of effectively and reliably managing permissions with a file-based level of granularity decreases security and increases vulnerability.

[ Reply to This | # ]