-
chown when owner has a dot in name
how can you change ownership of a file if the username you want to use has dot (.) in it? ... such as info.abc
When I try this, chown gives an error, "no such group", because the dot signifies a group name. I've tried single (') and double quotes (") around the name info.abc, which don't work either.
-
Well not to be an *** but who creates user names with a . in it anyway?
Mama always said life was like a box of chocolates.
-
since the server can only have unique names, you can't have two info@ users on one box... so by making it unique such as info.abc and info.def, etc. the user can be aliased as 'info'.
when the user is created its no problem, but something happened during a migration that requires the owner be set back to user name.
-
Originally posted by matt syracuse:
<STRONG>since the server can only have unique names, you can't have two info@ users on one box... so by making it unique such as info.abc and info.def, etc. the user can be aliased as 'info'.
when the user is created its no problem, but something happened during a migration that requires the owner be set back to user name.</STRONG>
Ah I see, but wouldnt an easier way have been to create a normal name and then alias it? Kinda the other way around?
[ 24 June 2002: Message edited by: chikn ]
Mama always said life was like a box of chocolates.
-
when you have 250 sites on a box (isn't Linux great) it makes it easier to find all the matching users by info.* ... any clues on how to chown with this type of name?
If I delete and re-create the user it's ok, but I have too many of them to do this with.
[ 24 June 2002: Message edited by: matt syracuse ]
-
I just created a user with a . in it test.123 created a files then chown the file to that user and it worked with the .
May 24 13:29 sbin/
drwxrwxrwx 2 root root 4096 Jun 5 16:31 share/
-rw-r--r-- 1 test.1 root 11 Jun 24 11:53 test1
drwxrwxrwt 7 root root 4096 Jun 24 04:21 tmp/
drwxr-xr-x 15 root root 4096 May 29 14:56 usr/
[ 24 June 2002: Message edited by: chikn ]
Mama always said life was like a box of chocolates.
-
the command "chown user.123 user.123" doesn't work - it says 'invalid group' -- what was your syntax?
-
chown <user> <filename>
If they need to belong to a certain group then
chgrp <group> <filename>
Mama always said life was like a box of chocolates.
-
Now that I think about it, it could be the folder name having the period causing the problem.
Try to chown the path
chown user.abc /home/user.abc
[ 24 June 2002: Message edited by: chikn ]
Mama always said life was like a box of chocolates.
-
nope that didn't work - it's the first argument that's causing the problem
---------\/
chown user.123 user.123
[ 24 June 2002: Message edited by: matt syracuse ]
-
When you create a user and group, it is given a numeric value as well (look in /etc/passwd and /etc/group.
use chown [uuid]:[gid] (filename)
*grin*
Lorithar ~~
The sum total of intelligence on the planet is a constant. Warning. The population is growing at an alarming rate.
-
funny you mention that because some of the files have numeric values as the owner! ... still, is there a way to assign the owner with a name containing a dot (.) like info.abc?
create a user like info.abc
notice a file is owned by info.abc
chown root <file>
now try: chown info.abc <file>
does it work for anyone?
-
Originally posted by matt syracuse:
<STRONG>funny you mention that because some of the files have numeric values as the owner! ... still, is there a way to assign the owner with a name containing a dot (.) like info.abc?
create a user like info.abc
notice a file is owned by info.abc
chown root <file>
now try: chown info.abc <file>
does it work for anyone?</STRONG>
Like I mentioned before it works on my boxen, dont understand why yours would act differently.
Mama always said life was like a box of chocolates.
-
I know this is an old thread, but the search term I used didn't give me any other forums.
I solved this problem by using id command. If your username is frank.name run the command: id frank.name
The output will have the id of frank in it in the form of uid=203(frank.name), where 203 is the system assigned user id.
then in your chown command instead of typing the username, use the uid and it will work. So it would look something like this:
chown 203:users <filename>
-
chown info\.abc filename
The Backslash escapes dot
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|