How do I resolve the below error. I want to change the ownership on sf_Temp file from media to dba.
[root@localhost media]# ls -l
drwxrwx--- 1 root vboxsf 0 Feb 1 16:10 sf_Temp
First of all I see your statement is wrong. The directory: sf_Temp is owned by user: root not user: media
Also I noticed that media is just the parent directory, BTW I'm not sure if there is indeed a user: media
So if you want to change the ownership of directory: sf_Temp from user: root to user: dba then try
I recommend reading File Permission and Access Modes for better understanding.
Hi all
usermod -G Group_id login
it is replacing the existiong Secoundry groups and is adding the only group speced in usermod command
how can we retain the existing secoundry groups and add a user to a new group (6 Replies)
When users login, they are directed to menu (aix script). The menu enables the user to choose an environment to work in. Each environment has a different group id. When a user chooses a menu option, I want to change his primary group to that specific environment's group id. Is this at all possible... (3 Replies)
Dear Folks :-)
I want to rsync some files between some servers and preserve files owner and group (not UID or GID), in some machines UID and GID are differents, for example:
a) In the rsync server:
# stat vbseo.php
File: `vbseo.php'
Size: 26758 Blocks: 56 IO... (1 Reply)
Hi,
i have a problem with a shell script. I need to change the owner and group of a file on a remote machine.
I tried to use ssh but have some problems.
The code:
group=`ssh -t -t $1 -p 3344 "stat -c %G $cpath/FILE"`
echo " $2:$group "
echo $1
echo $cpath
ssh $1 -p 3344 "chown... (5 Replies)
I´m listing the contents of a directory using the command
ls -lI get numeric uid and gid for some lines.
example:
drwxr-xr-x root root 1970-01-01 01:00 sys
-rw-r--r-- 501 20 0 2010-08-04 14:54 shutdown.bravo.rc
drwxr-x--- 501 20 ... (5 Replies)
Hey folks,
When a user is added to a new group, the user has to be log out and log in again to make the new group effective. Is there any system command or technique to refresh user group ID update without re-login?
I am not talking about to use "login" or "su -l" commands which can only make... (2 Replies)
Hi Everyone,
We are encountering the following issue on AIX 5.3. When we do ls -ltr the list displays only user id and group id instead of user name and group name.
This is happening for all users except root. Whe we do ls -ltr with root user it shows perfectly fine.
When we searched... (25 Replies)
I want to add a condition is my find command to include files/sub-directory whose owner or group is all numeric number.
My current find command is
find . \( -user root -o -user soham\) -type f -exec ls -l {} \; 2>&1
---------- Post updated at 10:20 AM ---------- Previous update was at... (5 Replies)
Discussion started by: Soham
5 Replies
LEARN ABOUT CENTOS
keyctl_chown
KEYCTL_CHOWN(3) Linux Key Management Calls KEYCTL_CHOWN(3)NAME
keyctl_chown - Change the ownership of a key
SYNOPSIS
#include <keyutils.h>
long keyctl_chown(key_serial_t key, uid_t uid, gid_t gid);
DESCRIPTION
keyctl_chown() changes the user and group ownership details of a key.
A setting of -1 on either uid or gid will cause that setting to be ignored.
A process that does not have the SysAdmin capability may not change a key's UID or set the key's GID to a value that does not match the
process's GID or one of its group list.
The caller must have setattr permission on a key to be able change its ownership.
RETURN VALUE
On success keyctl_chown() returns 0 . On error, the value -1 will be returned and errno will have been set to an appropriate error.
ERRORS
ENOKEY The specified key does not exist.
EKEYEXPIRED
The specified key has expired.
EKEYREVOKED
The specified key has been revoked.
EDQUOT Changing the UID to the one specified would run that UID out of quota.
EACCES The 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(3),
request-key(8)Linux 4 May 2006 KEYCTL_CHOWN(3)