Chown... cannot get the login group of a numeric UID


 
Thread Tools Search this Thread
# 1  
Chown... cannot get the login group of a numeric UID

How do I resolve the below error. I want to change the ownership on sf_Temp file from media to dba.
Code:
[root@localhost media]# grep ^media /etc/group
 
[root@localhost media]# ls -l
drwxrwx--- 1 root vboxsf 0 Feb 1 16:10 sf_Temp
drwxrwx--- 2 root vboxsf 4096 Jan 31 17:59 sf_VBoxShared
dr-xr-xr-x 6 oracle root 2048 Dec 19 09:20 VBOXADDITIONS_4.2.6_82870
total 10

root@localhost media]# chown dba: vboxsf sf_Temp
chown: `dba:': cannot get the login group of a numeric UID


Last edited by fpmurphy; 02-02-2013 at 06:45 PM..
# 2  
Quote:
Originally Posted by lutus
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
Code:
chown dba sf_Temp

I recommend reading File Permission and Access Modes for better understanding.
This User Gave Thanks to Yoda For This Post:
# 3  
Chown... cannot get the login group of a numeric UID

Thanks for the correction. However, I am still at a stop on this issue.
Media is not a user but a directory between oracle and sf_temp directory
An oracle user created a primary dba group via the user manager in vbox

So I ran this:

Code:
[root@localhost ~]# chown dba sf_Temp
chown: `dba': invalid user

[root@localhost ~]# su - oracle
[oracle@localhost ~]$ cd /media
[oracle@localhost media]$ ls -l
total 10
drwxrwx--- 1 root   vboxsf    0 Feb  1 16:10 sf_Temp
drwxrwx--- 2 root   vboxsf 4096 Jan 31 17:59 sf_VBoxShared
dr-xr-xr-x 6 oracle root   2048 Dec 19 09:20 VBOXADDITIONS_4.2.6_82870
[oracle@localhost media]$ chown dba sf_Temp
chown: `dba': invalid user

[oracle@localhost ~] $ chown dba sf_Temp
chown: `dba': invalid user


Last edited by Scott; 02-02-2013 at 09:18 PM.. Reason: Please use code tags
# 4  
Quote:
Originally Posted by lutus
An oracle user created a primary dba group via the user manager in vbox
Are you sure that user: dba exist? The error clearly states that it is an invalid user. If you are trying to change group ownership then you have to use chgrp command instead.

Please check the link that I suggested before for further reference.
This User Gave Thanks to Yoda For This Post:
# 5  
Resolved Chown... cannot get the login group of a numeric UID

I changed the user on sf_Temp dir. from root to oracle ( chown oracle sf_temp) And changed the group on sf_Temp dir. from root to dba ( chgrp -Rv dba filename)

Thanks for helping out and the link as well.
 

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Science: Computers
Difficulty: Easy
The NVidia GTX 1080 gets its name because it can only render at a 1920x1080 screen resolution.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

List files whose owner or group is numeric

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

2. AIX

UID & GID instead of user name and group name

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)
Discussion started by: madhav.kunapa
25 Replies

3. UNIX for Advanced & Expert Users

Can adding to a new group be effective in current login environment without re-login?

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)
Discussion started by: hce
2 Replies

4. Shell Programming and Scripting

Ps - list where UID is numeric or name and for current user

Hi, 'ps -ef' returns output of the following format UID PID PPID C STIME TTY TIME CMD root 17573 1 0 Sep12 tty6 00:00:00 /sbin/mingetty tty6 hpsmh 18150 14864 0 Sep12 ? 00:00:00 /opt/hp/hpsmh/sbin/hpsmhd -DSSL -f /opt/hp/hpsmh/conf/smhpd.conf root ... (3 Replies)
Discussion started by: ysrini
3 Replies

5. UNIX for Advanced & Expert Users

Numeric uid and gid in ls -l command

Im 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)
Discussion started by: flocki
5 Replies

6. Shell Programming and Scripting

chown remotely via ssh / invalid group

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)
Discussion started by: Linien
5 Replies

7. Shell Programming and Scripting

Rsync - Preserve owner/group with different UID/GID

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)
Discussion started by: Santi
1 Replies

8. Shell Programming and Scripting

Perl code to differentiate numeric and non-numeric input

Hi All, Is there any code in Perl which can differentiate between numeric and non-numeric input? (11 Replies)
Discussion started by: Raynon
11 Replies

9. UNIX for Advanced & Expert Users

Change a users primary group after login

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)
Discussion started by: terrym
3 Replies

10. UNIX for Dummies Questions & Answers

usermod -G and Group id login replacing existing groups

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)
Discussion started by: pbsrinivas
6 Replies

Featured Tech Videos