LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-22-2003, 12:21 AM   #1
correro
Member
 
Registered: Oct 2002
Distribution: RedHat 8.0
Posts: 140

Rep: Reputation: 15
file/directory access permission question


is there any way to set up directory access modifiers so that all files created in that directory will be owned by one user, no matter who created it?
 
Old 05-22-2003, 07:33 AM   #2
slightcrazed
Member
 
Registered: May 2003
Location: Lisbon Falls, Maine
Distribution: RH 8.0, 9.0, FC2 - 4, Slack 9.0 - 10.2, Knoppix 3.4 - 4.0, LFS,
Posts: 789

Rep: Reputation: 30
I do not believe so (someone please correct me if I am wrong).. File ownership is determined by the 'creator' of the file, and I do not think it can be changed on a directory by directory basis. I supposed you could create a script to run as a cron job that would chown all the files in the directory periodically, but that is more of a workaround, and not a solution.

Anyone else have any thoughts?

slight
 
Old 05-22-2003, 08:55 AM   #3
PhilD
Member
 
Registered: Mar 2003
Location: Iowa, US
Distribution: Mint
Posts: 174

Rep: Reputation: 30
Okay, I am just curious. Why would you want to do this? Your users would effectively be able to create a file that they have no access to?

I am not sure how this could be done, other than the cron job mentioned above. I am just wondering what someone would use this for.

PhilD
 
Old 05-22-2003, 09:09 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
funny how obscure questions tend to crop up in bunches....

you can set the sticky bit on the directory (chmod 1777 dir) which will force any file created in that directory to be owned by the group. I don't believe it will set the actual user, but that's the point of groups really, so it should be sufficient
 
Old 05-22-2003, 07:48 PM   #5
correro
Member
 
Registered: Oct 2002
Distribution: RedHat 8.0
Posts: 140

Original Poster
Rep: Reputation: 15
your insights are enlightening, especially the one about sticky bit @_@

correro
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i get permission to move file into directory timalan SUSE / openSUSE 2 08-24-2005 09:25 PM
script execution - file/directory permission issue serksimper Linux - Enterprise 1 08-10-2005 03:01 PM
how to give 'guest' rwx permission on a file/directory RH9Linux Linux - Software 3 06-27-2005 08:59 PM
Setting permission, file access. Apogeal1 Linux - Newbie 5 06-20-2005 08:17 PM
Setting File / Directory Permission, with sticky Primetime Linux - Newbie 3 01-06-2003 01:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:52 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
Open Source Consulting | Domain Registration