Operating System - Linux
1829053 Members
2454 Online
109986 Solutions
New Discussion

chown failed to get attributes of '//proc/2462/fd/3'

 
SOLVED
Go to solution
Maaz
Valued Contributor

chown failed to get attributes of '//proc/2462/fd/3'

Hi
i issued the command "#chown -R --from=user1 user2 /" and following fail message received
chown: failed to get attributes of '//proc/2462/fd/3': No such file or directory
Although the failed message was recieve, all of the files owned by user1, now in the ownership of user2, i.e. command succesfuly worked. So why the failed message received???

Second, a group named 'grp-a' owns some files/directories, which are spread all over the system(i.e in /var /usr /home etc)
what command should i issue, so that another group named grp-b, becomes the owner of all those files/directories, which are currently in the ownership of 'grp-a'.

Many Thanks
14 REPLIES 14
Vitaly Karasik_1
Honored Contributor

Re: chown failed to get attributes of '//proc/2462/fd/3'

do you *really* want to change ownership for all files starting from "/" ?!
Paul Cross_1
Respected Contributor

Re: chown failed to get attributes of '//proc/2462/fd/3'

Maaz, maybe you should post to the forum exactly what you need to accomplish. To put it mildly, the command you are trying to execute is not recommended on a production machine. It is likely to render your machine insecure, unstable, unusable.
Olivier Drouin
Trusted Contributor

Re: chown failed to get attributes of '//proc/2462/fd/3'

And you cant change file attributes on /proc...
Martin P.J. Zinser
Honored Contributor

Re: chown failed to get attributes of '//proc/2462/fd/3'

Hello .not. Sharf,

have a look are the --from in the man page. It changes all files that belong to user1 to user2, it does not change <> files

As for the group question for me the following seems to work:

chown --from=:grp-a :grp-b *

(Still I would check it locally before doing so with -R and / ;-)

Greetings, Martin

Maaz
Valued Contributor

Re: chown failed to get attributes of '//proc/2462/fd/3'

Ok GURUS,if i issue "#chown -R --from=user1 user2 /" command, it works, but I also receive failed message i already mentioned in my firs post. And if i issue as "#chown -R --from=user1 user2 /home/user1", it works, and dont produce any failed message. So any ideaz??? and again let me know what this FAILED MESSAGE MEANS???

Vitally karasik I *really* want to change ownership for all files starting from "/" .

Paul Cross, I just want to change ownership of files from one user to another. And I do agree with u, but its a need for me, anyway thanks a lot.

And Martin P.J. Zinser, u must b a GENIUS. Thanks for let me know 'chown --from=:grp-a :grp-b *', it really works, and even with -R option as well.

Again please let me know whats this failed message means???Regards

Maaz
Mark Grant
Honored Contributor

Re: chown failed to get attributes of '//proc/2462/fd/3'

Actually, the usual way to change the group from files is to use "chgrp".

I wonder if your original problem is that you have attempted to change the ownership if a process in the /proc directory. I know you shouldn't be ble to do this but try your "chown" again but don't include /proc in yout list of files to change.
Never preceed any demonstration with anything more predictive than "watch this"
Vitaly Karasik_1
Honored Contributor

Re: chown failed to get attributes of '//proc/2462/fd/3'

regarding error message - /proc is pseudo-filesystem, chmod can't work with such files.

Maaz
Valued Contributor

Re: chown failed to get attributes of '//proc/2462/fd/3'

Ok Many many thanks to u All, thanks for feedbacks/support. Now every thing is clear

Best Regards
Maaz
Paul Cross_1
Respected Contributor

Re: chown failed to get attributes of '//proc/2462/fd/3'

oops, was reading to fast...
Steve_160
Frequent Advisor

Re: chown failed to get attributes of '//proc/2462/fd/3'

To change groups in all the directories on your drive, try:for F in $( find / -mount -$OGID ) ; do chown $GID $F doneWhere "$OGID" is the old group id number and "$GID" is the new group name. "-mount" will keep it from searching NFS mounts.The group id number can be found in /etc/group.
#@%!! Windows!
Steve_160
Frequent Advisor

Re: chown failed to get attributes of '//proc/2462/fd/3'

I'm not sure what happened above. For some reason all my carriage-returns got deleted. The command starts with "for" and ends with "done."
#@%!! Windows!
Maaz
Valued Contributor

Re: chown failed to get attributes of '//proc/2462/fd/3'

Hello Steve,
could u please explain a bit more, i mean coulkd u please eleborate, what u said, through a step-by-step way

Best Regards

Thanks
Steve_160
Frequent Advisor
Solution

Re: chown failed to get attributes of '//proc/2462/fd/3'

I'm not having much luck getting this readable. For some reason it takes all the newlines out when I hit submit. I'm going to try putting my reply in an attachment, though I don't really know what that will do.
#@%!! Windows!
Maaz
Valued Contributor

Re: chown failed to get attributes of '//proc/2462/fd/3'

Many Thanks Steve. I really appreciate u for ur kind consideration, and feedbacks

Best Regards