LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-12-2003, 08:00 AM   #1
djroketboy
LQ Newbie
 
Registered: Jun 2003
Distribution: RedHat 8
Posts: 13

Rep: Reputation: 0
file/user permission problems...


hi guys.. i've searched, and searched for this, but can't seem to find my exact problem.. i know it's prolly very simple, but i would like just a xtra set of eyes to help me solve this issue.

My problem is somewhere in my file permissions, we run customized web software that allows our clients to remotely send us files via a client on their end, the client logs into our ftp and puts the files, then prints us up a job ticket.

The problem is when the file is uploaded to the ftp server *sometimes* the files are moved, and sometimes they aren't. (They are supposed to be moved everytime). What i'm thinking it is, when the client uploads files with a directory, that, that seems to be why it can't delete it... but i'm really not sure.

It's not just this particular web software doing this, if i were to upload a file/directory w/ a ftp client, then the same thing happens.

Another issue is that we can't create directory's more than 2 deep.. but sometimes, and some shares we can...

if you think you can shed any light on this issue.. or even send me in the right direction i'd really appreciate it.

Thanks for your time.

smb.conf:
Code:
# Global parameters

[global]
      workgroup = workgroup
#     server string = Kal-Blue Network Samba Server
#      server string = taz
      encrypt passwords = True
      security = user
      smb passwd file = /etc/smbpasswd
      log level = 1
      log file = /var/log/samba/log.%m
      socket options = IPTOS_LOWDELAY TCP_NODELAY
      domain master = Yes
      local master = Yes
      preferred master = Yes
      os level = 65
#      dns proxy = yes
#      wins server = 192.168.1.1
#      wins support = yes
#      wins proxy = yes
      netbios name = taz
      name resolve order = lmhosts hosts bcast
      bind interfaces only = True
#      interfaces = eth0 192.168.1.1 eth1 192.168.1.2 eth2 192.168.1.3
#      hosts allow = 192.168.1.0/255.255.255.0 127.0.0.1 EXCEPT 192.168.1.3
#      hosts deny = ALL
#      debug level = 1
      create mask = 0777
      directory mask = 0777
      oplocks = yes
      max xmit = 65535
      dead time = 15
      getwd cache = yes
#      lpq cache = 30
      read raw = yes
      write raw = yes
      write cache size = 262144
      lock directory = /var/lock/samba

[ftp]
        Comment = Public FTP Repository
        browsable = yes
        create mode = 0777
        directory mode = 0777
        path = /var/ftp
        public = yes
        only guest = no
        read only = no
        available = yes
        guest only = no
        writable = yes
        only user = no

[http]
        Comment = Kal-Blue Web Files
        browsable = yes
        create mode = 0777
        directory mode = 0777
        path = /var/www/html
        public = yes
        only guest = no
        read only = no
        available = yes
        guest only = no
        writable = yes
        only user = no

[printroom]
        Comment = Printroom file storage
        browsable = yes
        create mode = 0777
        directory mode = 0777
        path = /usr/public
        public = yes
        only guest = no
        read only = no
        available = yes
        guest only = no
        writable = yes
        only user = no

[copyroom]
	Comment = Copyroom file storage
	browsable = yes
	create mode = 0777
	directory mode = 0777
	path = /usr/copyroom
	public = yes
	only guest = no
	read only = no
	available = yes
	guest only = no
	writable = yes
	only user = no

[os]
	Comment = Operating System Files
	browsable = yes
	create mode = 0777
	directory mode = 0777
	path = /usr/os_share
	public = yes
	only guest = no
	read only = no
	available = yes
	guest only = no
	writable = yes
	only user = no

[tmp]
        Comment = Temporary Working Directory
        browsable = yes
        create mode = 0777
        directory mode = 0777
        path = /usr/temp
        public = yes
        only guest = no
        read only = no
        available = yes
        guest only = no
        writable = yes
        only user = no

Last edited by djroketboy; 09-24-2003 at 11:36 AM.
 
Old 08-12-2003, 01:27 PM   #2
JRandom
Member
 
Registered: Aug 2003
Location: Grand Junction, CO, USA
Distribution: Changes monthly. Also use Solaris, IRIX, and FreeBSD (and that's just at my house!)
Posts: 40

Rep: Reputation: 15
Hello,

I'm confused. I understand the web-based software uses FTP to transfer the files to your host. You mention that they can't be moved. What process or component is attempting the move? Also, how does Samba fit in to all of this.

I will guess that you are using Samba to move the files off from the FTP drop onto a Windows box? O.K.

If this is correct, what unix user and group owns the files in the FTP drop/upload directory? For security reasons, it's fine to give me a fake user and group. Are the file permissions correct? For move it should be 666. Be sure to check the FTP drop's directory permissions too.

What I'm getting at is that Samba has a force user/group option that may help. It "maps" the user that you windows box is logged in to and forces UNIX file operations to use a specific user (That didn't make much sense to me, even!).

So if the owner of the FTP'd files is 'ftp' and the group is 'ftp' then under the [ftp] section of you can try:

force user = ftp
force group = ftp

and see if that helps. Don't forget to restart Samba!

--Eric
 
Old 08-12-2003, 01:34 PM   #3
djroketboy
LQ Newbie
 
Registered: Jun 2003
Distribution: RedHat 8
Posts: 13

Original Poster
Rep: Reputation: 0
thanks for the reply, what you assumed is correct, the files get moved from the ftp via samba to a printroom directory...

i started playing with usergroups and permissions a bit more today, and think i realized what i did....

we have a generic login for our comps here.. let's say "user" but for ftp i created a new user "ftpuser" but never put them in the same group... so the ftp would create the files, the "user" would copy the files, but never delete them from the ftp... (make sense?)

so i changed the ownership of the ftp directory to match the "user" group... made sure both "ftpuser" and "user" are in the same group... and viola! everything is working seemless...

i guess i knew how to fix it all along, but just didn't hit me til after i posted this....

one other thing, if anyone know's, is there a way to "steamline" my samba config? just so it's a little faster.. and i've run testparm on it, everything checks out ok.. but just wanted to tweak it for speed a lil bit more

thanks y'all

Last edited by djroketboy; 02-15-2011 at 11:31 AM. Reason: remove personal info
 
  


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
chmod problems cerealdaemon Linux - General 2 07-22-2005 05:56 AM
chmod problems Harriskaver Linux - Newbie 8 06-04-2005 01:55 PM
Chmod samba BizHat.com Linux - Networking 4 03-16-2005 02:25 AM
CHMOD problems fritz001 Slackware 3 11-05-2004 05:15 AM
chmod problems teacup Linux - General 9 04-21-2003 11:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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