Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-30-2006, 09:38 PM
|
#1
|
Member
Registered: Jun 2006
Distribution: Debian Etch
Posts: 92
Rep:
|
mass file permission change help
Basically Ive been using for a few weeks. Ive been letting family memebers test it out on my login. One reaaly likes it and the way I set it up. SO i created a new user name and copied the home directory. only thing is everything is still the originail user's ownership.
is there a way without setting each file
So basically Im asking can I do it from a directory, then have the result of:
Root directory (/home/<user>)
root directory files and sub-folders
sub-folder files and more subfolder
etc
?
root meaning top, not root account
|
|
|
07-30-2006, 09:43 PM
|
#2
|
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep:
|
From /home type
chmod -R username : groupname username
Leave the spaces out before and after the colon - it makes I face if you don't post with the spaces though
|
|
|
07-30-2006, 09:43 PM
|
#3
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,242
|
Quote:
Originally Posted by mattd7591
Basically Ive been using for a few weeks. Ive been letting family memebers test it out on my login. One reaaly likes it and the way I set it up. SO i created a new user name and copied the home directory. only thing is everything is still the originail user's ownership.
is there a way without setting each file
So basically Im asking can I do it from a directory, then have the result of:
Root directory (/home/<user>)
root directory files and sub-folders
sub-folder files and more subfolder
etc
?
root meaning top, not root account
|
Try this:
chown -R <user name>:<user group> /home/<user>
So if the user's name is bob, and he's in the users group
chown -R bob:users /home/bob
That will get all the files/directories/sub-directories, but leave the file-permissions alone. If you don't want to bother with the user-groups, just omit that parameter from the command.
|
|
|
07-31-2006, 05:19 AM
|
#4
|
Member
Registered: Aug 2004
Location: India
Distribution: Redhat 9.0,FC3,FC5,FC10
Posts: 257
Rep:
|
To add to what TB0ne said.. use chown -Rh instead of chown -R so your symbolic links(if any) dont get messed up ...
But I'm still curious..when u created a new user surely the permissions on the directory u mentioned would be that of the new user and not that of root or the original user...
|
|
|
07-31-2006, 11:03 AM
|
#5
|
Member
Registered: Jun 2006
Distribution: Debian Etch
Posts: 92
Original Poster
Rep:
|
Thank You it worked.
I believed the directory changed ownership to the new user, but not the files
Thansk for the help
|
|
|
All times are GMT -5. The time now is 03:12 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|