Networking Forums

Networking Forums > Computer Networking > Linux Networking > How do I allow create directory but not move or delete in Samba/Linux?

Reply
Thread Tools Display Modes

How do I allow create directory but not move or delete in Samba/Linux?

 
 
Craig
Guest
Posts: n/a

 
      11-22-2004, 04:51 PM
I know I can set a directory to read-only after it is created, but
that means I have to constantly search the server for new folders
created by users (Windows clients). How do I make a default permission
with Linux/Samba to create, but not delete or move, a directory on a
server?
Thanks.
 
Reply With Quote
 
 
 
 
Peter T. Breuer
Guest
Posts: n/a

 
      11-22-2004, 05:14 PM
Craig <(E-Mail Removed)> wrote:
> I know I can set a directory to read-only after it is created, but


Why not do it before it is created? You are the only person allowed to
write in the superdir, right? So set your umask to something like 077.
Hic.

> that means I have to constantly search the server for new folders
> created by users (Windows clients). How do I make a default permission
> with Linux/Samba to create, but not delete or move, a directory on a
> server?


Your question makes no sense. Try again. The perms on a directory are
the decision of its creator. If you are not the creator, you have no
say in whether it is readonly or not. If you are the creator, make it
readonly.

Peter
 
Reply With Quote
 
IANAL_VISTA
Guest
Posts: n/a

 
      11-24-2004, 01:09 AM
(E-Mail Removed) (Craig) wrote in
news:(E-Mail Removed) om:

> I know I can set a directory to read-only after it is created, but
> that means I have to constantly search the server for new folders
> created by users (Windows clients). How do I make a default permission
> with Linux/Samba to create, but not delete or move, a directory on a
> server?
> Thanks.


So close to knowledge, but so far from reality. ;-)

Whether or not you meant it, the ability to "delete or move" a
directory directly requires WRITE access to its parent directory.
To create a subdirectory REQUIRES that you ca WRITE to the parent.
Both of these are true because to create, move, or delete a directory
requires the parent directory file to be MODIFIED/WRITTEN to.

> I know I can set a directory to read-only after it is created,

Which directory is being set "read-only", the parent or the newly
created subdirectory?

Read-only for which users?

What good is an empty read-only folder?
 
Reply With Quote
 
Craig
Guest
Posts: n/a

 
      11-24-2004, 05:50 PM
Thanks for your replies.
My end goal is to prevent users from deleting or moving entire folders
(easy to do with drag and drop). Sorry, I am not a linux expert, just
the computer guy for a small office.

I was trying to figure out a way in Linux/Samba do to the same thing
my old DOS/Lantastic server allowed over a decade ago. Users were
allowed to create directories, and subdirectories, but not delete
them.

This was not the same as a read-only folder, users could create and
delete files within the protected directories. This was not an
attribute/permission of the directory, but a permission of what the
user was allowed to do.

If you apply this to the linux method of applying r/w permissions to
each file/directory, perhaps it could be thought of as fine-tuning the
write permission to say write-to-create, write-to-delete, etc.

Maybe I am way off-base on this, should I be looking at a different
function?
Thanks.
 
Reply With Quote
 
Michael Heiming
Guest
Posts: n/a

 
      11-25-2004, 10:42 PM
In comp.os.linux.networking Craig <(E-Mail Removed)>:
> Thanks for your replies.
> My end goal is to prevent users from deleting or moving entire folders
> (easy to do with drag and drop). Sorry, I am not a linux expert, just
> the computer guy for a small office.


With a recent distro you should be able to mount ext3 with "acl",
so you shouldn't need to compile the kernel.

This should do what you want:

http://www.bluelightning.org/linux/samba_acl_howto/

Good luck

--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo (E-Mail Removed) | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 19: floating point processor overflow
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Do all Linux distros have Samba built-in? Detect if Samba installed? Matthew Lincoln Linux Networking 8 11-17-2008 12:11 AM
Joining Samba 3.02rc1 to Active Directory Phoenix Linux Networking 0 01-30-2004 08:02 AM
Cannot copy or move this item to this location. Create a shrtcut instead Windows Networking 0 01-27-2004 04:34 PM
permission denied writing in samba shared directory on linux pepijn Linux Networking 1 10-13-2003 08:17 PM
Sharing directory with Samba Fabricio Greco Linux Networking 5 09-29-2003 02:07 PM



1 2 3 4 5 6 7 8 9 10 11