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.
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.
I want to change permissions for files and folders, seperately. The problem is that IŽd like to give permissions to FILES as rw------- (600) and IŽd like to give permissions to FOLDERS as rwx------ (700). How can I do that?
Can I separate folders from files with chmod
For example:
chmod -R 700 * (just for folders)
chmod -R 600 * (just for files)
-R stands for recursively changing modes within subtrees...
This basically changes all files to 0700 permissions recuresively (in Linux directories are pointers to groups of files); then I run another 0600 permission command of files found recursively except folders. Make sure you do it as root and make sure you are changed to the proper directory.
WARNING: Don't do this from the root directory! Run 'pwd' and make sure you are in a directory other than root '/'.
This basically changes all files to 0700 permissions recuresively (in Linux directories are pointers to groups of files); then I run another 0600 permission command of files found recursively except folders. Make sure you do it as root and make sure you are changed to the proper directory.
WARNING: Don't do this from the root directory! Run 'pwd' and make sure you are in a directory other than root '/'.
Could you please help me? I installed a script which installed about 50 directorys on my hosts server in the public_html folder. What I would like to do is change the permissions on the folders only to 755 but no file permission changes at all.
I that the script needs to chmod 755 all of the '3cache' subfolders. So I have my main public_html with about 50 subfolders, inside these folders there is a folder called '3cache' I need to change to 755.
I tried the command "find 3cache -type d -exec chmod 0755 {} \;" but it does not seem to do it correctly.
I find it easier to use the special execute mode X (capital x).
chmod -R u=rwX,go= directory/
From Wikipedia:
Quote:
X (special execute) is not a permission in itself but rather can be used instead of x. It applies execute permissions to directories regardless of their current permissions and applies execute permissions to a file which already has at least 1 execute permission bit already set (either user, group or other).
So if you previously applied execute to all files, you'll first need to remove all rights:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.