[ILUG] CHMOD

David Wilkins dwilkins at maths.tcd.ie
Fri Jan 9 17:22:07 GMT 2009


I wonder whether there is any particular reason why people use, or
recommend, codes like 777.  It is surely easier to remember the usage
exemplified in the following:

  chmod u+rwx myfile     (grant read, write, execute to the user, i.e.,
owner, of the file)

  chmod go+rx myfile     (grant read and execute permissions to group, and
to others)

  chmod go-r myfile        (make file unreadable to group and others)

  chmod u-w myfile         (make file unwritable for user)

  chmod ug+x                 (make the file executable by user and group
members)

   u = user who owns the file
   g = any member of the group associated with the file
   o = any other user of the system

Similarly you can grant read, write and execute permission for directories
just as for files.  (Manuals will clarify
what the privilege of 'executing' a directory allows people to do.)

Surely this usage is easier, especially for the less experienced Linux or
UNIX user than 777 etc.

David

2009/1/9 Miguel Angel Vilela <miguev at gmail.com>

> chmod 777 folder
>
> man chmod for more details ;-)
>
> On Jan 9, 2009 3:45 PM, "Conor Mac Aoidh" <conormacaoidh at gmail.com> wrote:
>
> Hi,
>
> I just have a quick question about permissions. How to you grant all
> read, write, everything permissions to a folder with chmod?
>
> Thanks
> --
> Conor
>
> http://macaoidh.name
> --
> Irish Linux Users' Group mailing list
> About this list : http://mail.linux.ie/mailman/listinfo/ilug
> Who we are : http://www.linux.ie/
> Where we are : http://www.linux.ie/map/
> --
> Irish Linux Users' Group mailing list
> About this list : http://mail.linux.ie/mailman/listinfo/ilug
> Who we are : http://www.linux.ie/
> Where we are : http://www.linux.ie/map/
>



More information about the ILUG mailing list