1834862 Members
2787 Online
110070 Solutions
New Discussion

file permission

 
j773303
Super Advisor

file permission

The file permission has 3 pars, that's
user, group, others
Anyone can tell me, what's the others?
Where to reference others permission?
Hero
7 REPLIES 7
Paula J Frazer-Campbell
Honored Contributor

Re: file permission

Hi

This should help:-



A numeric mask replaces the current file mode creation mask. It is specified as an unsigned octal integer, constructed from the logical OR (sum) of the following mode bits (leading zeros can be omitted):

0400 ( a=rwx,u-r) Read by owner
0200 ( a=rwx,u-w) Write by owner
0100 ( a=rwx,u-x) Execute (search in directory) by owner
0040 ( a=rwx,g-r) Read by group
0020 ( a=rwx,g-w) Write by group
0010 ( a=rwx,g-x) Execute/search by group
0004 ( a=rwx,o-r) Read by others
0002 ( a=rwx,o-w) Write by others
0001 ( a=rwx,o-x) Execute/search by others


Paula
If you can spell SysAdmin then you is one - anon
Ramkumar Devanathan
Honored Contributor

Re: file permission

hi,

Try this in your shell -
$ id
the above will provide you your user id and your group id.

All other users having your group id as theirs too, will enjoy the permissions you set for the group.

All users in general whatsoever their group id, will enjoy the permissions that you set in the others part.

So, it is always best to give minimal permissions (say read only, or if it is an executable file only execution rights) in the others part.

see the following
man umask
man chmod

- ramd.
HPE Software Rocks!
Stefan Farrelly
Honored Contributor

Re: file permission

others means EVERYONE. Ie. all users can access files if the others permission is set (either read, write or execute/entry).

You can use chmod o+r (or +w or +x) to set others permission. If you list a file (wioth ls -l) the others permission is the last 3 digits.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Yogeeraj_1
Honored Contributor

Re: file permission

hi,

Other (o) - Other refers to everyone except the owner of the file and everyone that is in the group to which the file belongs.

see: http://www.cs.indiana.edu/Facilities/help/permissions.html

regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Frank Slootweg
Honored Contributor

Re: file permission

Yogeeraj gave an important detail:

The permissions are *exclusive*, i.e. you are either the owner *or* a member of the group *or* other. So this fails:

$ id
uid=101(franks) gid=101(ftp_group)
$ ll file
-------rwx 2 franks ftp_group 8 Apr 15 14:48 file
$ cat file
cat: Cannot open file: Permission denied
$

I.e. I can not read this file, even while I (franks) am the owner and a member of the group (ftp_group). Why? Because I am *not* in the set "other".
Ramkumar Devanathan
Honored Contributor

Re: file permission

Thanks Frank and Yogeeraj - I didn't know that.

- ramd.
HPE Software Rocks!