LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-25-2014, 03:56 PM   #1
Axel van Moorsel
Member
 
Registered: Jan 2011
Location: Netherlands (Zuid Holland)
Distribution: Debian 8
Posts: 31

Rep: Reputation: 4
Inherit permissions from parent folder


I want to have files copied to a NFS share inherit permissions from the parent folder. The NFS share is on a Debian 6 webserver.

What happens now is:
ls -l /sourcefolder
-rwx------ 1 user sourcegroup .... file.csv
cp /sourcefolder/file.csv /targetfolder/file.csv
ls -l /targetfolder
-rwx------ 1 user targetgroup .... file.csv

What I want is:
ls -l /sourcefolder
-rwx------ 1 user sourcegroup .... file.csv
cp /sourcefolder/file.csv /targetfolder/file.csv
ls -l /targetfolder
-rwxrw---- 1 user targetgroup .... file.csv

As you can see in the first example the group is inherited from the parentfolder, but the permissions are not. What must I do to let the file inherit the permissions from the parentfolder?

Last edited by Axel van Moorsel; 02-25-2014 at 03:57 PM.
 
Old 02-26-2014, 01:22 PM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
I'm not sure about this, but couldn't you use acl for this? http://www.ghacks.net/2010/01/28/fur...iles-with-acl/
I don't know if it works on nfs shares, only used it on regular file-systems.
 
  


Reply

Tags
inheritance, permissions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set file ownership to inherit its parent folder? pauloray Linux - Virtualization and Cloud 2 01-15-2012 06:54 PM
[SOLVED] Can not inherit the permission from parent folder to child. Toushi Linux - General 4 04-28-2011 06:15 AM
inherit permissions of the parent directory in newly created file abhijit_mohanta Linux - Newbie 1 09-10-2009 06:45 PM
automatically inherit parent folder permissions when copying files teixeira Linux - Newbie 3 07-08-2008 12:21 PM
Samba - Inherit Permissions from Parent Directory bence8810 Linux - Software 6 08-03-2006 06:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration