LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-08-2006, 06:28 PM   #1
power_wong
LQ Newbie
 
Registered: May 2006
Posts: 3

Rep: Reputation: 0
About file access right


I am a Linux beginner. My question is about file access and Samba.The situation is:
User A and User B is in the same group. In a folder calls "public", I want to let both user can delete any files inside. I found that if a file is created by User A, even I change its mod to 0777, User B still cannot delete it, only can edit and save it. Must need User A or root to delete it. If User B access this file from other Windows OS through Samba, it seems even cannot edit it though I have set "writable = yes" for User B in smb.conf.
Is it a Linux security? Is there anyway that can reach my purpose to let both of them can create, edit and delete any file inside that folder?
 
Old 05-08-2006, 07:11 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
You should be able to do it with the following:
- Put user A and user B in a common group, for example absamba;
- Change the group membership of the directory and the files it contains to absamba chgrp -R absamba directoryname;
- Force files created in the directory to keep their group membership with chmod g+s directoryname;
- Change your samba.conf so that the share containing the directory has force group = absamba
- Have a read through the options at http://us4.samba.org/samba/docs/using_samba/appb.html, including force create mode

Hope that helps...
 
Old 05-08-2006, 07:26 PM   #3
power_wong
LQ Newbie
 
Registered: May 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Hi gilead,
Thanks for your quick help. I will try it and tell you the result.
 
  


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
Help regarding file access..... rajsun Programming 2 12-08-2005 04:32 AM
Question about /etc/access file gauge73 Linux - Networking 0 07-05-2005 03:13 PM
Access file in windown pc - help acrors Red Hat 1 08-26-2004 11:04 PM
Isolating read access to only to one file only by another file. jon_k Linux - Software 3 08-14-2004 05:16 AM
Access to a file kaiozero General 1 10-18-2001 08:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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