LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-10-2010, 02:38 AM   #1
saran_redhat
Member
 
Registered: May 2009
Location: chennai
Posts: 247

Rep: Reputation: 16
Samba server


Hi Friends

I have File server (samba) in my office. I need to give some special permissions for folder and files. for example.
The root user can do read, write, execute and delete. but other users and group users are can able to read, write and execute. but users and group users are can't able to delete the file and folders. only root users can delete files and folders. please help me how to i give access for that folders.

I am using centos5.

Thanks.
 
Old 11-10-2010, 02:46 AM   #2
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
AFAIK, you can't differentiate writing and deleting within samba from a technical perspective, but why would you want to? What's the logical difference, in terms of your data integrity, in deleting a file and removing all the contents from the file and saving is as empty?
 
Old 11-10-2010, 04:53 AM   #3
saran_redhat
Member
 
Registered: May 2009
Location: chennai
Posts: 247

Original Poster
Rep: Reputation: 16
samba

Quote:
Originally Posted by acid_kewpie View Post
AFAIK, you can't differentiate writing and deleting within samba from a technical perspective, but why would you want to? What's the logical difference, in terms of your data integrity, in deleting a file and removing all the contents from the file and saving is as empty?
Hi
Thanks for reply.

My main thing is normally in linux users and group users cant able to delete. root only do that. how i do this can you advise me.
 
Old 11-10-2010, 05:17 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
Quote:
Originally Posted by saran_redhat View Post
Hi
Thanks for reply.

My main thing is normally in linux users and group users cant able to delete. root only do that. how i do this can you advise me.
Again, why? if they can write they can do just as much damage.
 
Old 11-10-2010, 05:19 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
That is not true. It depends which files you are talking about. The files and folders owned by root are not accessible to others. In the same way files and folders owned by others can not be deleted. And everything depends on the nature of the permissions.
 
Old 11-10-2010, 06:09 AM   #6
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
Quote:
Originally Posted by linuxlover.chaitanya View Post
That is not true. It depends which files you are talking about. The files and folders owned by root are not accessible to others. In the same way files and folders owned by others can not be deleted. And everything depends on the nature of the permissions.
Well he seems to want the root files to be accessible, just not deletable, and under a posix environment, a user can write to a file owned by someone else but with 666 rights, so that would naturally fall through to proivde what the OP is asking for I guess, but there is still the question of why this is important in the first place. if the user can destroy the contents of a file, who cares if they can delete it or not?
 
Old 11-10-2010, 06:30 AM   #7
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Exactly. It seems OP is confused on the permissions front. And by default root can actually read write and delete the files. I do not what OP wants and why.
 
Old 11-11-2010, 03:12 AM   #8
saran_redhat
Member
 
Registered: May 2009
Location: chennai
Posts: 247

Original Poster
Rep: Reputation: 16
Samba

Quote:
Originally Posted by linuxlover.chaitanya View Post
Exactly. It seems OP is confused on the permissions front. And by default root can actually read write and delete the files. I do not what OP wants and why.
My problem is always folder and files missing complaints that is the reason the users can able to read write permissions but they cant able to delete file and folders.everyday lot of files and folder deleted in the server.
i dont know who deleted and how it was happen. so please give any solution to restrict this issues.

thanks
 
Old 11-11-2010, 03:22 AM   #9
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
In all honesty, user education I'd say. But as above, if these files are owned by root and world writable, users actually wouldn't be able to delete them under conventional posix standards. But don't use the root account, that's really not good.
 
Old 11-11-2010, 03:24 AM   #10
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Check on sticky bit if that can help here: http://en.wikipedia.org/wiki/Sticky_bit
 
Old 11-11-2010, 04:26 AM   #11
saran_redhat
Member
 
Registered: May 2009
Location: chennai
Posts: 247

Original Poster
Rep: Reputation: 16
samba

Quote:
Originally Posted by linuxlover.chaitanya View Post
Check on sticky bit if that can help here: http://en.wikipedia.org/wiki/Sticky_bit
Hi
Thanks for the reply.
sticky bit is used to restrict one user's data to others access. but in this scenario how is possible please can u explain briefly.
because one folder can access multiple users and groups. please advise me.
 
Old 11-11-2010, 06:21 AM   #12
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Sticky bit is used to restrict deletion and renaming of files. And that is what you want. But keep in mind, sticky bit is set on folders. This is closet you can get. So you can use this and find some solution to your issue.
 
Old 11-11-2010, 07:06 AM   #13
saran_redhat
Member
 
Registered: May 2009
Location: chennai
Posts: 247

Original Poster
Rep: Reputation: 16
samba

Quote:
Originally Posted by linuxlover.chaitanya View Post
Sticky bit is used to restrict deletion and renaming of files. And that is what you want. But keep in mind, sticky bit is set on folders. This is closet you can get. So you can use this and find some solution to your issue.
Hi

Thanks for reply.

sticky bit is suit or not in samba file server. because in others concept its ok.
but it this case one folder access by many users at the same time. how we use otherwise any changes to in smb.conf file please advise
thanks

Last edited by saran_redhat; 11-11-2010 at 07:10 AM.
 
Old 11-11-2010, 11:17 PM   #14
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
I dont know how to do that in samba. I have not used it like you want to. But you could google on that front now.
 
Old 11-11-2010, 11:20 PM   #15
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
What you could do is set sticky bit on the parent folder that is shared in samba recursively. This will make all the contents sticky. You will need to make no changes in the samba configuration then.
 
  


Reply



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
Basic Samba Server or Active Directory Central Login via LAM/LDAP/SAMBA metallica1973 Linux - Server 5 06-09-2010 11:27 AM
Is there any way to log user samba who delete or move files/folders on samba server ? b-RAM Linux - Server 1 02-09-2010 12:33 AM
Move user files from Samba server to new samba server TheB2B Linux - Server 3 11-10-2007 08:30 PM
samba member server as fileserver authenticating samba PDC activeq Linux - Networking 0 11-17-2006 09:44 AM
Samba domain member server (DMS) group permissions in network with a Samba PDC srosa Linux - Networking 0 05-01-2006 05:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:33 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