Results 1 to 10 of 13
Dear Group,
I am creating new users with adduser command in linux and it's working fine. But whenever I copy any file as a root to the home directory of ...
- 11-10-2007 #1Just Joined!
- Join Date
- May 2007
- Posts
- 8
Problem with file permission
Dear Group,
I am creating new users with adduser command in linux and it's working fine. But whenever I copy any file as a root to the home directory of that user, user is unable to access that file. While accessing the files which was copied by root, it shows buffer read only. Please advice how to resolve this issue. I want to give full access to the particular user.
Thanking you...
...Jay
- 11-10-2007 #2Linux Enthusiast
- Join Date
- Aug 2006
- Posts
- 631
Make the new user the owner of the files with "chown" and change the group ownership with the "chgrp" command.
Check the man pages of chown and chgrp.
Regards
- 11-10-2007 #3Banned
- Join Date
- Oct 2007
- Posts
- 219
Right click on mouse, then "properties", and then "Permission", etc.
- 11-12-2007 #4Just Joined!
- Join Date
- May 2007
- Posts
- 8
Dear All,
Thanks for your quick response. However, suggested way is not my requirement. By this way for each file which is copied by Root user need to be change manually. Can this be automated to root user need not to execute chown/chgrp command for each and every file? Please suggest.
...Jay
- 11-12-2007 #5
you can use -R option to change permissions recursively.
Code:chown -R <user>:<group> <folder>
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 11-12-2007 #6Just Joined!
- Join Date
- May 2007
- Posts
- 8
Dear devils_casper,
Thanks for your prompt reply, however, it is not solving the purpose. It is working very fine for all those files which have been copied to user's home directory but whenever I copied any new files as SU, the same problem occured. Users are getting read-only buffer.
What I was trying, whenever su copy any files to user's home directory, that file should have read/write access to that particular user. Please suggest to eradicate this problem.
...Jay
- 11-12-2007 #7
Can you please give us a sample of the exact command you use to copy a file in this situation?
And if you sometimes copy more than one file in the same command in this situation, can you also please give us a sample of the exact command you use to copy these files?--
Bill
Old age and treachery will overcome youth and skill.
- 11-12-2007 #8
You've got to cp -a that file. -p would work for permissions, but I think it won't preserve selinux context, which is normally what you want to do.
- 11-13-2007 #9Just Joined!
- Join Date
- May 2007
- Posts
- 8
Dear wje_lf,
I am copying file from window share through samba (as su). For example I have created a new user say abc
Whenever, I am copying a file as su to /home/abc directory, user abc is getting read-only buffer.
I hope I made it clear.
Thx,
...Jay
- 11-13-2007 #10Can you post one of the commands that you use to copy? Please don't describe the command, just post the exact command.Whenever, I am copying a file as su to /home/abc directory--
Bill
Old age and treachery will overcome youth and skill.


Reply With Quote