Solved

Linux - Set folder & File permission inheritance on sub-folders and files

Posted on 2014-09-19
11
585 Views
Last Modified: 2014-09-30
We are a Linux file server.
I have created a new folder and get a group ownership to that folder. I have given the specific user access to that group.
When a use creates a file or folder it make it read only for all other users.
How can I set it so that any file and sub folder will still retain the same permissions as the parent folder?
I will then also need to run a command that will change all permissions on the all curenly folders already created.
0
Comment
Question by:bax2000
  • 4
  • 4
  • 3
11 Comments
 
LVL 15

Expert Comment

by:Haris Djulic
ID: 40332306
0
 
LVL 6

Assisted Solution

by:xeroxzerox
xeroxzerox earned 250 total points
ID: 40332358
Hi,

you should use chmod command for set permission on sub-folders and files....for example

chmod -R 770 foldername
(-R is use for recursive )

and
(for set default permission)
Now, use the following command to set the default ACL:
#setfacl -dm u::rwx,g::rwx,o::r /directoryname
0
 

Author Comment

by:bax2000
ID: 40332372
Hi xeroxzerox

What is the full path for the setfacl command as I get the following when trying to run it.
-bash: setfacl: command not found
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 6

Expert Comment

by:xeroxzerox
ID: 40332378
Full path of setfacl
/usr/bin/setfacl

If you want any full path of command then just run below command.
#whereis setfacl
if it installed then it gives you full path....
0
 

Author Comment

by:bax2000
ID: 40332387
Seems as though setfacl is not installed on the server we have.
Any alternative?
0
 
LVL 15

Expert Comment

by:Haris Djulic
ID: 40332396
which server it is? it will help with the solutions
0
 
LVL 6

Expert Comment

by:xeroxzerox
ID: 40332397
Which Linux Distribution You Are Using?
0
 

Author Comment

by:bax2000
ID: 40332411
Running   openSUSE 12.2
0
 
LVL 15

Expert Comment

by:Haris Djulic
ID: 40332523
0
 

Author Comment

by:bax2000
ID: 40332556
Where can I download it from?
0
 
LVL 15

Accepted Solution

by:
Haris Djulic earned 250 total points
ID: 40332619
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
CentOS create a user with predefined MD5 Hashed password 17 85
Backup & Restore 3 56
Use CRON to save a copy of an open file 1 40
Linux script delete files 3 35
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question