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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Hey! I'm running Ubuntu. I have a folder in the /opt/ folder I need to make full-access. Can you give me a command that makes it full-access (read,write,etc.) INCLUDING subdirectories? I guess it would be for everyone (if possible), but if it has to be something it would be user 'andrew'.
Thanks, that worked! I want to make sure I'm doing this right. I'm running a webserver (xampp), and PHP was having troube, and exploring it from my windows pc to the server (samba), premissions would get messed up.
So, it making the directory full-access a good solution to this problem? I need full access to work on my site through samba.
World writable permissions are typically not a good idea.
Set the permissions to "770" for starters. "2770" may be better even.
And give them an appropriate user/group as owner.
Samba will access the files as some user/group, so you'll only need to give "full" access to that user/group.
Make also sure that the user under which your webserver runs has read access to the files (for your website).
OK, I understand this so far. I access smb through user 'andrew', which is also the user in which the server runs. Can you give me a command that will set 770 or 2770 (whats the difference, anyway?) for just andrew? Thanks!
Read = 4, Write = 2 and Execute = 1.
7 = 4 + 2 + 1 = rwx (read-write-execute).
0 = no permission.
Permissions are usually given in 3 such digits: one for the user that owns the file/dir, one for the group and one for everyone else.
So, 770 simply means full access to user/group, no access at all for anyone else.
The 2 in front indicates the setGID permission bit. This bit sets the Group ID (the numerical representation of a group) whenever the directory is executed (ie when someone searches through the directory or adds/deletes a file).
This will have the effect that all newly created files will automatically be owned by the group that owns the directory itself. This in turn has some benefits relating to access for website admins.
Use "chown" to make the directory owned by "andrew". Then use "chmod" with permission 770, 2770 or even more strict (ie 750).
If you're not comfortable using the octal representation of permissions, you can use the character representations too. See man chmod for details.
chmod -R u+rwx some_dir
gives the user (owner) rwx permissions.