LinuxQuestions.org
Help answer threads with 0 replies.
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 06-06-2011, 03:53 AM   #1
Undermind
Member
 
Registered: Sep 2009
Location: Denmark
Distribution: Arch Linux
Posts: 37

Rep: Reputation: 15
Inherit ACL, when copying to folder


Hello there

I've ran into a pickle regarding permissions and ACL. My users has a folder called "UVdokumenter", in wich they want to put documents up for sharing and editing. Everyone needs to be able to edit the files in that folder, so i set the ACL to this:
Code:
# file: UVdokumenter/
# owner: fleten
# group: sambashare
user::rwx
group::rwx
mask::rwx
other::---
default:user::rwx
default:group::rwx
default:group:sambashare:rwx
default:mask::rwx
default:other::rwx
This works wonderfully, if the files are created in the folder. My trouble is, i would like for any files copied to the folder to inherit those permissions. Reading around, it would seem like ACL's dont bend that way. Is there a clever way for me to work around this? Or am i missing something obvious?

Regards, and thanks in advance
 
Old 06-06-2011, 06:07 AM   #2
manyrootsofallevil
Member
 
Registered: Dec 2010
Distribution: Red Hat, Kubuntu
Posts: 130

Rep: Reputation: 14
You could run a cron job every minute, that sets the permissions and ACLs to what you need them to be.
 
Old 06-07-2011, 01:09 AM   #3
Undermind
Member
 
Registered: Sep 2009
Location: Denmark
Distribution: Arch Linux
Posts: 37

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by manyrootsofallevil View Post
You could run a cron job every minute, that sets the permissions and ACLs to what you need them to be.
I have thought of that solution too myself. I wonder, though, if there is a smarter way to do this. I believe MS Server's shares automatically changes file permissions when a file is moved. But if thats the only solution there is, that is what i will do. Thanks for your time
 
Old 06-08-2011, 04:27 AM   #4
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
What about replacing the cp by a cat:
Code:
$ cat myfile > mydestination
Then the files should be newly created at the destination.
 
Old 06-09-2011, 02:55 AM   #5
Undermind
Member
 
Registered: Sep 2009
Location: Denmark
Distribution: Arch Linux
Posts: 37

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Reuti View Post
What about replacing the cp by a cat:
Code:
$ cat myfile > mydestination
Then the files should be newly created at the destination.
I think it would be tricky to implement in practice, as my users aren't excactly console cowboys. I'll look into it though
 
  


Reply


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
There was an error copying the file into smb:// PcName/Folder/Folder morbid_bean Linux - Networking 3 01-19-2017 04:44 AM
[SOLVED] Can not inherit the permission from parent folder to child. Toushi Linux - General 4 04-28-2011 06:15 AM
[SOLVED] C++ classes - a matter of style? inherit or not inherit? worzel1968 Programming 25 03-21-2011 02:40 PM
[SOLVED] Copying the files inside a folder, without copying the folder (hopefully easy) tibberous Linux - Software 3 12-23-2010 01:50 AM
automatically inherit parent folder permissions when copying files teixeira Linux - Newbie 3 07-08-2008 12:21 PM

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

All times are GMT -5. The time now is 10:15 AM.

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
Open Source Consulting | Domain Registration