Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 08-15-2005, 05:55 PM   #1
Registered: Feb 2002
Posts: 322

Rep: Reputation: 30
Advice: consistency in file system permissions

I have a folder that is being accessed, primarily, through FTP and Samba. This folder is NOT the root of the Samba share, or of the FTP root. However, the files in this folder need to be owned and writable by a given user.

The given user does own the folder in question, and has appropriate permissions. However, when subdirectories or new files are created, they are, by default, owned by root (user) and users (group). This is an issue because the given user needs to have full control of the folder

There are solutions to the problem, but none of them give me what I want.

Proposed solutions:
1) Create a shell script that resets the ownership & permissions every X minutes (a cron job) - this might be my best bet, but unless its running every minute, it could leave periods where files made by samba aren't accessible by the FTP user

2) Change samba to force ownership to a specific user. I'm not sold on this idea because it is a share-level setting.

Do you have any advice on the issue? Is there a way to make sure new files created in that directory match the parent directory's ownership and permissions?
Old 08-15-2005, 06:15 PM   #2
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
How you tried setting the sticky permission for the directory? when there logging in are they coming in under a special user, or are they coming in as themselves. because usually only root can create root directories.

What might be happening is samba or the ftp is running as root, and its actually these that are creating the directories so they directories are inheriting the programs user, no the user who has logged in.


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to restore the default file permissions (whole system) ? bbbb Linux - General 2 11-05-2005 04:10 AM
File System Advice AxXium Linux From Scratch 3 08-02-2005 11:30 AM
file system permissions problem guy24x Linux - Security 8 04-07-2005 06:09 PM
file system advice sought jagmandan Linux - General 2 07-01-2004 08:37 PM
File system Help \ Newbie Advice KarmaKill Linux - Newbie 4 06-23-2004 11:53 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:22 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration