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.
hi, quick question: how do allow a specific user full permissions over a specific folder, subfolders, and files within? (read/write/exec/delete/etc). I've read a bunch of man pages and I'm more confused now than before, and I don't want to mess things without asking first
here is a little more in depth thingy-majiggy:
chmod owner|group|other <folder||file>
so, if you wanted lets say only the group, and the owner to be able to do Execute+Write+Read, and no one else you'd use:
chmod 770 <folder||file>
hope that helps..
(btw, if the directory you want to give access to the user isn't already the owner or atleast part of that group, use chown, or chgrp)
Permissions can be modified using chmod (options) filename
just an example...
' ls -l junk4 '
-rwxr-xr-x 1 foo bar 6514 Aug 1 10:34 junk4
the first set refers to user, second to group, third to other
so
user = rwx
group = r-x
other = r-x
I personally use numbers to change permissions but you can use the letters if the numbers don't make sense...
what the numbers mean:
0 = no permission
1 = execute
2 = write
4 = read
You can add the numbers to change the permissions to what you want.
so 1+4=5 = r-x
2+4=6 = rw-
1+2+4=7 = rwx
So if I want a file to have rwxrw-r-- permissions I would do chmod 764 filename
You can also change using letters
u=user
g=group
o=other
a=all
then use + - or = to what you want
so chmod a-x will remove execute permissions for all users
chmod u+rwx will add rwx to the user
check out the man page 'man chmod' it explains other options and flags you can use...
edit:
Maybe I need to type faster or something... Best advice is make a file and mess with permissions until you are comfortable...
Last edited by Blinker_Fluid; 10-10-2003 at 01:17 PM.
ok, well, this is a stupid question i'm sure, but is there a way for me to tell linux that i'm the owner?
i'm trying to install the java sdk, and as per some instructions on this help page (step 3)
i need to alter the .bashrc but i can't make changes to it
it says i do not have permissions to change the permissions, so, i need to "become" the owner so to speak. and considering this is my computer, i think i should be allowed that property
any help on solving my own lack of knowedge?
thanks muchly
The .bashrc file is the one in your home directory, yes? If you can't change it as yourself, try using su (or su -) to become root and then change the permissions as per the above instructions.
it still didn't work
i tried using chown as both root and as myself, and it didn't give me an error msg or anything, but i still can't save changes to .bashrc
ok, i'm not sure what i did, i logged in as root and changed some permissions that it wudn't change b4 (even as su) and then went back to my user and then it let me save it soo, all's well that ends well thanks for ur help ppl!
coupace
Originally posted by XavierP Su doesn't seem to have all of the permissions. I believe that if you use 'su -' then you get full permissions. Glad to hear it worked, though.
The permissions should still be the same. Running "su -" starts a new shell for the user you are suing to - this is useful for loading extra paths such as /sbin automatically.
Thanks david_ross, I was repeating something I read against a different question. I didn't think it was fully correct, but as no one corrected the person I took it as read.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.