LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-10-2004, 07:34 PM   #1
t3___
Member
 
Registered: Sep 2003
Posts: 240

Rep: Reputation: 30
Samba directory permissions and VSFTPD


I am using the current version of VSFTPD as an FTP server for external users, clients etc. on a SUSE 9.0 box. Internal users access the ftp directory via a samba share. all permissions seem to be set up properly except for one particular action.

When internal users create a folder via samba, vsftp users can enter the directory, but cannot write to it.

VSFTP users can sucessfully create directories, upload files to directories they just created, delete directories, upload files to the root ftp folder, etc.... they are just unable to upload files to a directory created by samba users.... oh and yes, samba users can write files to the problem directory... Ive tried various "directory mask" global settings to no avail... (removed because of no sucess)

here is my smb.conf file - any help would be greatly appreciated

~~~~~~~~~~~~
smb.conf
~~~~~~~~~~~~
# Samba config file created using SWAT
# from 0.0.0.0 (0.0.0.0)
# Date: 2004/01/30 15:40:41

# Global parameters
[global]
netbios name = LS001
server string =
encrypt passwords = Yes
null passwords = Yes
log level = 1
syslog = 0
socket options = SO_KEEPALIVE IPTOS_LOWDELAY TCP_NODELAY
printcap name = CUPS
os level = 2
comment = TPC Ftp Folder
path = /srv/ftp
printing = cups
veto files = /*.eml/*.nws/riched20.dll/*.{*}/

[printers]
comment = All Printers
path = /var/tmp
create mask = 0600
printable = Yes
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775

[ftpshar]
read only = No
delete readonly = Yes
 
Old 05-11-2004, 12:19 PM   #2
t3___
Member
 
Registered: Sep 2003
Posts: 240

Original Poster
Rep: Reputation: 30
Any ideas folks?
 
Old 05-12-2004, 11:36 AM   #3
sirpimpsalot
Member
 
Registered: Feb 2004
Posts: 141

Rep: Reputation: 15
could this have anything to do with the fact that VSFTPD uses a different user account than the generic account used for samba?

please guys... i am desperate for some clues!
 
Old 05-12-2004, 11:44 AM   #4
JohnLinx
LQ Newbie
 
Registered: Jan 2004
Posts: 27

Rep: Reputation: 15
T3,
I would agree with Sirpimpalot, you might want to set up a like Group for these accounts, allowing RW access. If that is what you really want.
 
Old 05-12-2004, 11:57 AM   #5
sirpimpsalot
Member
 
Registered: Feb 2004
Posts: 141

Rep: Reputation: 15
thank you for your reply (t3 and sirpimpsalot are both me

ok, but the writability issue only appears on new folders created by the samba user, so its not a matter of modifying the permissions on an existing directory... rather new folders created by the samba user that need to be RW to the ftp user. oddly it works the other direction (samba user can add files to folders created by VSFTPD).

btw:

here is my vsftpd.conf file
~~~~~~~~~~~~~~~~~~~

write_enable=YES
dirmessage_enable=YES
local_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
pam_service_name=vsftpd
anonymous_enable=NO
local_umask=000




and the xinet.d entry for vsftpd
~~~~~~~~~~~~~~~~~~~~
# default: off
# description:
# The vsftpd FTP server serves FTP connections. It uses
# normal, unencrypted usernames and passwords for authentication.
# vsftpd is designed to be secure.
service ftp
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/vsftpd
# server_args =
# log_on_success += DURATION USERID
# log_on_failure += USERID
# nice = 10
# disable = yes
 
Old 05-12-2004, 06:36 PM   #6
sirpimpsalot
Member
 
Registered: Feb 2004
Posts: 141

Rep: Reputation: 15
in case it might help someone else, I fixed this problem by adding the option:

inherit permissions = Yes (is set to no by default)

in my smb.conf file as the root FTP directory has static "everything" permissions to both the samb and the ftp user.
 
  


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
Samba-3, Active Directory, file permissions wellssh Red Hat 0 10-20-2005 07:41 AM
Samba directory permissions - can't write from XP ajkrishock Linux - Networking 2 10-16-2005 12:56 PM
samba file/directory permissions jonfa Linux - Networking 2 06-29-2005 08:03 AM
How do I mount a samba directory with write permissions? xerogravity Linux - Newbie 7 12-05-2004 01:43 PM
vsftpd and file/directory permissions dynamo|x Linux - Security 7 06-01-2003 09:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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