Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
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.
i have a directory that only root has permission to access or execute, and i need to give a user on the system permission to modify/execute for all files and subdirectories of this directory.
The chmod command is what your looking for. Now giving one particular use read/write/execute permissions is harder than what I know how to do but to give all users r/w/x permissions run 'chmod ugo+rwx directory/ -R'. The ogu is for user(owner)/group/others and rwx is, as above, read/write/execute. Hope this works for you!
is there any way to wipe who the user and group is and assign it a new group and user, so that i can just have write and execute abilities by that new user??
Sure. First 'chown username.usergroup directory -R' and then 'chmod 700 directory/ -R'. The 700 is octal for the permissions for the command. The 7 is for the owner of the file/directory, the first 0 is for the group, and the last 0 is for all others. This should give only that one user r/w/x permissions on that directory and all files in it.
Originally posted by Hmmyah is there any way to wipe who the user and group is and assign it a new group and user, so that i can just have write and execute abilities by that new user??
Code:
groupadd special
usermod -G special username
chown -R username:special /the_directory
chmod ug+rwx /the_directory
chmod o-rwx /the_directory
At least that's how I'd do it... not that I'm saying it's the only right way to do it... or that if it's even 100% right at all
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.