I have a file ( /tmp/file.txt ) , the file owner is user1:edp , the permission is 644 , I want everyone can overwrite the file but don't change the file owner and permssion , could suggest what can I do ? thx (2 Replies)
there is a directory eg. /home/edp/ , all the files under this directory :
1. the file and directory owner is "user1" ,
2. the permission is 644
I want everyone hv permission to overwrite all files and write a new file to it , but I want the file owner and permssion keep unchange , could... (1 Reply)
Hi Folks
I have a file with the following permission.
-r-sr-lr-- 1 apps appsgp 7612 Dec 19 2001 startup
Any idea what is the in the group means? In my mind I believe I need to be root to set l in the group. Am I right?
I don't have root access now. When I (as apps) a chmod... (2 Replies)
Hi,
When I listed one directory in Sun, it showed that :
-rwsr-xr-x 1 root bsmbin 78004 Oct 21 2004 bsmprsm
I don't know meaning of the character "s" in "rws" above. I have searched in Sun admin documents but no result. Would you please explain it ? :)
Thank you so much. (1 Reply)
Hello,
i need some help/advice on how to solve a particular problem.
these are the users:
|name | group |
---------- ---------------
|boss | department1 |
|assistant | department1 |
|employee | department1 |
|spy | department2 |
this is the... (0 Replies)
hi frnds
can u explain
/etc/shadow file have read and write permissions for root only
but while normal user changes his passwd it also updated in that file whats the logic behind that. (2 Replies)
Hi All,
https://www.unix.com/unix-advanced-expert-users/105758-chmod-parent-sub-directories.html
I have to change permission for the directories and subdirectories in single command
when googled i found some updates but i understand what is switch.
If there is a command please... (2 Replies)
I have an application with the user mark and another user james is trying to run the application and ending up with file permission issues.
The user mark has set the umask as 002, I wanted to have a setting so that anyone can run the application without any file permission issues. Can anyone... (2 Replies)
Hi Friends,
I want to create one user on my server in such a way that when he logged in by ssh on server,he can able to access ONLY /var/www/drupal-6.2 this directory. Please tell me how should i do that. (4 Replies)
Hello All
I have a file with rw-rw-r permission
I need to mv the file into different directory (dir has rwx-rwx-rwx permission)
with an others permission
The application which is moving the file falls in other group
I am getting the error
mv cannot renamed permission denied
... (12 Replies)
Discussion started by: Pratik4891
12 Replies
LEARN ABOUT LINUX
keyctl_setperm
KEYCTL_SETPERM(3) Linux Key Management Calls KEYCTL_SETPERM(3)NAME
keyctl_setperm - Change the permissions mask on a key
SYNOPSIS
#include <keyutils.h>
long keyctl_setperm(key_serial_t key, key_perm_t perm);
DESCRIPTION
keyctl_setperm() changes the permissions mask on a key.
A process that does not have the SysAdmin capability may not change the permissions mask on a key that doesn't have the same UID as the
caller.
The caller must have setattr permission on a key to be able change its permissions mask.
The permissions mask is a bitwise-OR of the following flags:
KEY_xxx_VIEW
Grant permission to view the attributes of a key.
KEY_xxx_READ
Grant permission to read the payload of a key or to list a keyring.
KEY_xxx_WRITE
Grant permission to modify the payload of a key or to add or remove links to/from a keyring.
KEY_xxx_SEARCH
Grant permission to find a key or to search a keyring.
KEY_xxx_LINK
Grant permission to make links to a key.
KEY_xxx_SETATTR
Grant permission to change the ownership and permissions attributes of a key.
KEY_xxx_ALL
Grant all the above.
The 'xxx' in the above should be replaced by one of:
POS Grant the permission to a process that possesses the key (has it attached searchably to one of the process's keyrings).
USR Grant the permission to a process with the same UID as the key.
GRP Grant the permission to a process with the same GID as the key, or with a match for the key's GID amongst that process's Groups
list.
OTH Grant the permission to any other process.
Examples include: KEY_POS_VIEW, KEY_USR_READ, KEY_GRP_SEARCH and KEY_OTH_ALL.
User, group and other grants are exclusive: if a process qualifies in the 'user' category, it will not qualify in the 'groups' category;
and if a process qualifies in either 'user' or 'groups' then it will not qualify in the 'other' category.
Possessor grants are cumulative with the grants from the 'user', 'groups' and 'other' categories.
RETURN VALUE
On success keyctl_setperm() returns 0 . On error, the value -1 will be returned and errno will have been set to an appropriate error.
ERRORS
ENOKEY The specied key does not exist.
EKEYEXPIRED
The specified key has expired.
EKEYREVOKED
The specified key has been revoked.
EACCES The named key exists, but does not grant setattr permission to the calling process.
LINKING
This is a library function that can be found in libkeyutils. When linking, -lkeyutils should be specified to the linker.
SEE ALSO keyctl(1),
add_key(2),
keyctl(2),
request_key(2),
keyctl_get_keyring_ID(3),
keyctl_join_session_keyring(3),
keyctl_update(3),
keyctl_revoke(3),
keyctl_chown(3),
keyctl_describe(3),
keyctl_clear(3),
keyctl_link(3),
keyctl_unlink(3),
keyctl_search(3),
keyctl_read(3),
keyctl_instantiate(3),
keyctl_negate(3),
keyctl_set_reqkey_keyring(3),
keyctl_set_timeout(3),
keyctl_assume_authority(3),
keyctl_describe_alloc(3),
keyctl_read_alloc(3),
request-key(8)Linux 4 May 2006 KEYCTL_SETPERM(3)