LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] chmod a+rX -r /etc/xdg/menus

[ILUG] chmod a+rX -r /etc/xdg/menus

Brian Foster blf at utvinternet.ie
Tue Jan 29 22:03:00 GMT 2008


  | Date: Tue, 29 Jan 2008 08:39:29 +0000
  | From: Frank Murphy <frankly3d.ilug at gmail.com>
  | 
  | Fedora-8-xfce
  | 
  | root at fedora8 ~]# chmod a+rX -r /etc/xdg/menus
  | chmod: cannot access `a+rX': No such file or directory
  | 
  | /etc/xdg/menus  does exist.
  | 
  | Where am I going wrong

 as others have noted, chmod(1) does not have a -r option.
 whilst that's pedantically correct, it's not quite right.
 normally, on an non-existent option like -r, you'd expect
 an error something like:

     chmod: invalid option -- r
     Try `chmod --help' for more information.

 so why the rather mysterious complaint that a+rX does not
 exist?

 well .... because -r *IS* a legal mode setting to chmod;
 in particular, it means a-r (i.e., remove read permission
 for everyone).  because it starts with - the command line
 is rearranged (probably by GNU getopt_long(3)) so that it
 is the first arg:

     chmod -r a+rX /etc/xdg/menus

 the missing a is then supplied:

     chmod a-r a+rX /etc/xdg/menus

 now chmod attempts to remove read permission for everyone
 from all the listed files, starting with the "file" a+rX.
 there is no such file, hence the error ....

 and it did remove all read permissions from /etc/xdg/menus
 (in case you hadn't noticed).

cheers!
	-blf-
-- 
“How many surrealists does it take to    |  Brian Foster
 change a lightbulb?  Three.  One calms  |  somewhere in south of France
 the warthog, and two fill the bathtub   |     Stop E$$o (ExxonMobile)!
 with brightly-coloured machine tools.”  |       http://www.stopesso.com



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell