LinuxQuestions.org
Review your favorite Linux distribution.
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 04-19-2002, 03:01 AM   #1
greenhornet
Member
 
Registered: Mar 2002
Location: Sydney, Australia
Distribution: RHEL, Fedora, Yellow Dog
Posts: 43

Rep: Reputation: 15
Question Can 3 network services use the same umask?


Hi All,

I've setup a server to have a dedicated "groups" drive mounted as /group so that people can share files.

I have a number of groups setup in /etc/group and users are members of them. Directories in /group are given these group names and the sticky bit is set so thier permissions are 2770.

The problem is depending on which method people use move files to the group directories will result in different permissions for said files.

ie) putting a file in a group folder (see perms for . )
drwxrws--- 7 root testgrp 4096 Apr 19 14:35 .
drwxr-xr-x 4 root root 4096 Apr 12 00:44 ..
-rw-rw---- 1 crichard testgrp 248 Apr 9 18:03 test.atalk
-rw-r--r-- 1 crichard testgrp 0 Apr 10 13:58 test.ftp
-rw-rw---- 1 crichard testgrp 0 Apr 10 14:18 test.samba

You can see files moved into this dir by samba and netatalk are given appropriate permissions (in that they are readable and writeable by the group). However the ftp file is not writable by the group, this is a problem.

How can I change this, I tried editing the default umask for UIDs 0-99 (hoping on of them was the ftp user) in /etc/bashrc to 002 but this didnt work.

How can I get my ftp daemon (wu-ftp) to put files in with perms 660? (and dirs with 770) I've tried looking around the web but can only find info for changing the anonymous users umask?

I am also having similar problems with new directories being put in the group folder. ie
drwxrws--- 7 root testgrp 4096 Apr 19 14:35 .
drwxr-xr-x 4 root root 4096 Apr 12 00:44 ..
drwxrwxr-x 1 crichard testgrp 248 Apr 9 18:03 dir.atalk
drwxr-sr-x 1 crichard testgrp 0 Apr 10 13:58 dir.ftp
drwxrws--- 1 crichard testgrp 0 Apr 10 14:18 dir.samba

Here samba is ok (configured a umask myself in smb.conf), ftp has respected the sticky bit (but still wont give write access to group). netatalk is just wrong, it has respected the sticky bit for THIS directory (ie it has given it to testgrp but not placed the sticky bit on the new folder).

Can anyone help. I really have tried solving this myself but I was only able to find info for configuring samba and got that to work successfully.

Ideally I would really need access from the shell, ftp, samba and netatalk to all create files with perms 660 and directories 770 (with sticky bit on).

thanks heaps for reading this far.
Craig
 
Old 04-19-2002, 03:04 AM   #2
greenhornet
Member
 
Registered: Mar 2002
Location: Sydney, Australia
Distribution: RHEL, Fedora, Yellow Dog
Posts: 43

Original Poster
Rep: Reputation: 15
Whoops forgot some relevant info

I am using
- samba-2.2.1a-4
- netatalk 1.5.2-2
- wu-ftpd 2.6.1-20

All these were installed from Redhat RPMS on a Redhat 7.2 machine.
 
Old 04-23-2002, 10:16 PM   #3
greenhornet
Member
 
Registered: Mar 2002
Location: Sydney, Australia
Distribution: RHEL, Fedora, Yellow Dog
Posts: 43

Original Poster
Rep: Reputation: 15
Thumbs up

Well I've managed to figure this out myself. Here is the solution for anyone reading this later on.

SAMBA : specify a default umask per share in /etc/samba/smb.conf
ie - I added
create mode = 0660
directory mode = 0770
to my share template.

netatalk : The version of Netatalk I was using was broken, upgrading to 1.5.3-1 solved my prolbems. A helpfull guy also pointed me here to created a custom umask
quote : "You might want to have a look at afpd's -m switch to force an umask? This is one of the switches currently documented nowhere except the sources:
http://www.geocrawler.com/lists/3/So...15/75/8350642/

ftp : for wu-ftp on redhat 7.2 you specify a default umask for all users in /etc/ftpaccess. This is the same as using the -u argument in /etc/xinetd.d/wu-ftpd.
Just add defumask 0007 (in my case)
This will be overridden by any other defumask commands for specific groups/users and also any upload directives.
 
  


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
mount network drive fstab/umask? J.Q. Monkey Linux - Newbie 3 02-24-2004 12:49 PM
Restarting network services Bull Terrier Slackware 2 12-15-2003 09:19 AM
Cannot access any services outside local network webnoelle Linux - Software 19 07-24-2003 07:55 PM
Shutting down network services durden2.0 Linux - Newbie 1 06-10-2003 01:32 AM
Network services going down frequently Passive Linux - Networking 2 03-08-2002 04:05 PM

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

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