Hello Perumal,

The mode is used for specifying what permissions to use in case a new
file is created.  Here are the numbers and a brief description for the
different modes:
   00700 user (file owner) has read, write and execute permission
   00400 user has read permission
   00200 user has write permission
   00100 user has execute permission
   00070 group has read, write and execute permission
   00040 group has read permission
   00020 group has write permission
   00010 group has execute permission
   00007 others have read, write and execute permission
   00004 others have read permission
   00002 others have write permisson
   00001 others have execute permission

You should be able to combine the 'user", 'group' and 'others' to get
the permission set that you are looking for.

Jer

On Jan 21, 11:44 pm, perumal316 <[email protected]> wrote:
> Hi,
>
> The function definition for system call sys_open is
>
> asmlinkage long sys_open(const char __user *filename,int flags, int
> mode);
>
> I am writing a module and in it I am accessing sys_open but not sure
> what should be the value of mode. I couldn't find any link specifying
> what are the different modes and what is the difference.
>
> Thanks In Advance,
> Perumal

-- 
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit our group at 
http://groups.google.com/group/linuxusersgroup

Reply via email to