Re: [OCLUG-Tech] what the heck is the rationale for 'X' in chmod command?
On Fri, 23 Feb 2018 02:51:52 -0500 (EST) "Robert P. J. Day"wrote: > i can't believe i've never noticed the 'X' (upper case) permission > setting for the chmod command, explained thusly in the man page: > > "The letters rwxXst select file mode bits for the affected users: read > (r), write (w), execute (or search for directories) (x), > execute/search only if the file is a directory or already has execute > permission for some user (X), set user or group ID on execution (s), > restricted deletion flag or sticky bit (t)..." > what is the rationale for that particular setting? what problem is > it trying to solve? i'm just a bit puzzled. Let's say you have an entire directory tree that's only user-readable. You want to make it group- and other-readable and also make the directories therein group- and other-executable. You'd use: chmod -R og+rX /root/of/tree This turns on execute permissions for directories (and any files that are executable), but not for normal non-executable files. Regards, Dianne. ___ Linux mailing list Linux@lists.oclug.on.ca http://oclug.on.ca/mailman/listinfo/linux
Re: [OCLUG-Tech] what the heck is the rationale for 'X' in chmod command?
On Fri, 23 Feb 2018, Stephen M. Webb wrote: > On 2018-02-23 02:51 AM, Robert P. J. Day wrote: > > > > i can't believe i've never noticed the 'X' (upper case) permission > > setting for the chmod command, explained thusly in the man page: > > > > "The letters rwxXst select file mode bits for the affected users: read > > (r), write (w), execute (or search for directories) (x), > > execute/search only if the file is a directory or already has execute > > permission for some user (X), set user or group ID on execution (s), > > restricted deletion flag or sticky bit (t)..." > > > > what is the rationale for that particular setting? what problem is > > it trying to solve? i'm just a bit puzzled. > > It lets you fix broken permissions easily. Imagine a quick "chmod > -R a+X ." on a home directory in which you unzipped some DOS files > which lack any POSIX permission to traverse the contained folders, > because DOS. ah, quite so, thanks. rday ___ Linux mailing list Linux@lists.oclug.on.ca http://oclug.on.ca/mailman/listinfo/linux
Re: [OCLUG-Tech] what the heck is the rationale for 'X' in chmod command?
On 2018-02-23 02:51 AM, Robert P. J. Day wrote: > > i can't believe i've never noticed the 'X' (upper case) permission > setting for the chmod command, explained thusly in the man page: > > "The letters rwxXst select file mode bits for the affected users: read > (r), write (w), execute (or search for directories) (x), > execute/search only if the file is a directory or already has execute > permission for some user (X), set user or group ID on execution (s), > restricted deletion flag or sticky bit (t)..." > > what is the rationale for that particular setting? what problem is > it trying to solve? i'm just a bit puzzled. It lets you fix broken permissions easily. Imagine a quick "chmod -R a+X ." on a home directory in which you unzipped some DOS files which lack any POSIX permission to traverse the contained folders, because DOS. -- Stephen M. Webb___ Linux mailing list Linux@lists.oclug.on.ca http://oclug.on.ca/mailman/listinfo/linux