Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 04-23-2008, 10:43 PM   #1
Registered: Feb 2007
Posts: 386

Rep: Reputation: 30
problem with file/directory permission access from samba/webserver

I setup a webserver where user is allow to create a text file and/or directory (via CGI). There is another thread that accessing this server via samba to add/delete files on the server.

I have a problem where the thread accessing this server via samba cannot delete/create files under directory created by the cgi.

For example, CGI create a directory cgi1/sub_cgi1 at /home/user1/cgi1/sub_cgi.
Another thread (samba) is supposed to create a file call a.txt in /home/user1/cgi1/sub_cgi1, but it is not working.

I am using the umask 777 /home/user1 , but for some reason it does not apply to the sub_cgi1 directory. Looking at man page, there is no recursive option for the umask. not sure what i can do to fix this problem.
Old 04-24-2008, 07:17 PM   #2
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
If you look carefully, you will probably find that the newly-created subdirectory is not owned by user1, but rather by apache, since that is the process in control when the directory (and its files) is created. The file permission system is working just as it should; you probably need to change your CGI script so that, when it creates a directory or file on behalf of a user, it changes the owner (and group) of that directory or file to match that of the parent directory.

Good luck


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
samba: windows file access permission kool_kid Red Hat 5 09-25-2007 02:01 PM
Permission problem with uni multi-user webserver Proud Linux - Security 5 04-17-2005 11:42 AM
Samba access by Windows users locking out directory access with Konqueror harry_fine SUSE / openSUSE 1 12-18-2004 05:33 AM
What is the correct Samba permission to my webserver /www directory? how to piratebiter Linux - General 1 09-21-2003 06:12 PM
file/directory access permission question correro Linux - General 4 05-22-2003 07:48 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:07 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration