LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 03-15-2006, 04:20 PM   #1
piforever
Member
 
Registered: Dec 2005
Distribution: CentOS 5 - Debian 5
Posts: 112

Rep: Reputation: 15
Granting permission to files owned by apache


Hi everyone,

In my FC4 setup, I have a web based torrent client and it continuously add files to a specific folder. This folder and its contents are owned by Apache. I share this folder using samba in my home network. The question is: How can I give a samba user the permission to delete the files in this folder or create new files/folders without altering the ownership of the main folder or its contents.....
 
Old 03-15-2006, 07:51 PM   #2
piforever
Member
 
Registered: Dec 2005
Distribution: CentOS 5 - Debian 5
Posts: 112

Original Poster
Rep: Reputation: 15
I created a new user and added it to the apache group
Code:
/usr/sbin/useradd -M -s /bin/false -g apache sambauser
and then I added the user to samba and restarted samba. Now when I access the folder using the newly created user from windows i can't delete/write any files although the user belongs to the group apache...

/etc/passwd
Code:
sambauser:x:501:48::/home/sambauser:/bin/false
/etc/samba/smbpasswd
Code:
sambauser:501:ABDC5ADF....
What is the problem??!!!
 
Old 03-16-2006, 12:46 PM   #3
piforever
Member
 
Registered: Dec 2005
Distribution: CentOS 5 - Debian 5
Posts: 112

Original Poster
Rep: Reputation: 15
Hi,

I removed the user i created...and added this to my samba configuration file....now i can do whatever i want...

Code:
        comment = Torrents
        path = /home/torrents
        force user = root
        writeable = yes
        delete readonly = yes
 
Old 03-18-2006, 08:51 PM   #4
ARC1450
Member
 
Registered: Jun 2005
Location: Odenton, MD
Distribution: Gentoo
Posts: 290

Rep: Reputation: 30
Better idea: add the users to your apache group, then give the group rwx on the folder.

Not sure I'd ever force root user, just because you may have some users you don't want messing with it.
 
  


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
permission denied on .htaccess files in Apache scott.anderson Linux - Software 3 12-16-2005 12:19 PM
all users have access to root owned files sakatola Linux - Security 2 07-22-2005 12:45 AM
Granting Permission RedRedKrovy Linux - Newbie 3 01-03-2005 11:13 PM
Make a file owned by root owned by a user sharpie Linux - Newbie 2 02-26-2004 01:26 AM
Un-Owned files? Half_Elf Linux - General 3 05-18-2003 11:26 PM

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

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