LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 09-21-2007, 02:45 AM   #1
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,209

Rep: Reputation: 55
Permissions and directories


I am trying to puzzle out a permission issue.

I have a partition with a mountpoint /mnt/documents

/mnt/documents is of course owned by root and only root has write permission.

I want users to be able to copy folders and files into /mnt/documents but they are not allowed to. Of course I could setup /mnt/documents/user/ with full user permissions but this seems like an unnecessary layer. I do not want to give users write permission for /mnt/documents because then they could potentially delete the directory.

So how do I give users permission to copy to /mnt/documents/ without write permission for the /mnt/documents file itself?

TIA
 
Old 09-21-2007, 02:51 AM   #2
Pau Gasol
Member
 
Registered: Jan 2006
Distribution: Debian Lenny, Slackware 12
Posts: 33

Rep: Reputation: 15
EDIT: Didn't read well the first post, sorry
 
Old 09-21-2007, 02:57 AM   #3
ghostdancer
Member
 
Registered: Apr 2002
Distribution: Slackware
Posts: 266

Rep: Reputation: 30
I think, you can setup the directory like /tmp so any users can write to that directory, but they can only handle their own files or directories, but not those owned by others.

Code:
$> ls -ld /tmp
drwxrwxrwt 20 root root 4096 2007-09-21 15:37 /tmp/

$> chmod u=rxw,g=rxw,o=rxw+t /mnt/documents
$> ls -ld /mnt/documents
drwxrwxrwt 2 root root 4096 2007-09-21 15:51 /mnt/documents/
You are doing this as a backup storage for your users?

Last edited by ghostdancer; 09-21-2007 at 02:58 AM.
 
Old 09-21-2007, 03:11 AM   #4
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,209

Original Poster
Rep: Reputation: 55
These are either backup files or shared files.

So setting up the directory as drwxrwxrwt should not case any problems with the directory itself being deletable by any user?
 
Old 09-21-2007, 03:21 AM   #5
ghostdancer
Member
 
Registered: Apr 2002
Distribution: Slackware
Posts: 266

Rep: Reputation: 30
Quote:
Originally Posted by arubin View Post
These are either backup files or shared files.

So setting up the directory as drwxrwxrwt should not case any problems with the directory itself being deletable by any user?
Is just like tmp, anyone can write into it and manage those files/directories belong to him. Only root has the ownership of tmp, so only root can delete the entire /tmp directory.

You can just create a /t directory in root, switch normal user do: "cd /t ; mkdir ttt; touch aa ; rm -rf /t" -> You will get permission deny for those that you have not ownership, only those that belongs to you gets deleted.

The directory is not delete-able by any user, it is just write-able by any user.

Last edited by ghostdancer; 09-21-2007 at 03:26 AM.
 
Old 09-21-2007, 03:28 AM   #6
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,209

Original Poster
Rep: Reputation: 55
Thanks.

Alan
 
Old 09-21-2007, 03:56 AM   #7
ghostdancer
Member
 
Registered: Apr 2002
Distribution: Slackware
Posts: 266

Rep: Reputation: 30
You welcome. Glad to know this solved your problem.
 
  


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
changing permissions only for directories xpucto Linux - Newbie 2 03-11-2007 05:09 AM
finding directories w/ certain permissions secular Linux - Security 1 12-28-2004 04:36 PM
home directories permissions black_man Debian 1 11-20-2004 09:48 AM
Changing Permissions on Directories... bob4432 Linux - Newbie 6 06-25-2004 02:50 PM
permissions home directories powadha Debian 6 06-11-2004 11:45 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration