Subject: umode/mask for newly created files...

From: "Michael Paesold" <[email-masked]>
Date: Fri, 19 May 2000 00:25:36 +0200

Hi!

I need netatalk to create files with mask 660 and directories with 770, so
that every member of the group can access every file and directory. How can
I achieve that? In samba you can set a "force user mode" option, but there
is none in netatalk. I'm happy with every piece of information. (I use
netatalk on Linux 2.2.14)

Greetings,
Mike

--
Michael Paesold, mailto:[email-masked]
Vienna, Austria, Europe

---

From: "Lancaster, David Matthew" <[email-masked]>
Date: Thu, 18 May 2000 21:15:40 -0300 (ADT)

Have a similar situation, and the only solution is to enable the setgid
bit on the directory, and chmod 770 the directory. AFAIK, netatalk
defaults to the same permissions as the encompassing folder (ie. dir=720,
then file becomes 720), but not the same user & group. If you put the
setgid bit on, any file or directory will be created with the same group
as the original.  So, use a directory with 770+ setgid, and it should
work.

D.

David Lancaster                       (506) 454-2167
  690 Gregg Ct.                       Upper Apartment
  Fredericton, NB  Canada             E3B 4H5
  [email-masked]       "Don't anthropomorphize computers, they hate that."

---

From: Patrik Schindler <[email-masked]>
Date: Fri, 19 May 2000 08:58:26 +0200

>netatalk on Linux 2.2.14)

Set the umask in /etc/profile accordingly (to 002 in your case).

:wq! PoC

---

From: "Michael Paesold" <[email-masked]>
Date: Fri, 19 May 2000 09:55:41 +0200

> Set the umask in /etc/profile accordingly (to 002 in your case).

Correct me if I'm wrong, but that would change the default action of any
program, which would be a problem. With common ftp servers there is an
option "-u umask", that would be great for netatalk, too.

For now I prefer the setgid solution.
Thanks to all for your suggestions.

Greetings,
Mike

--
Michael Paesold mailto:[email-masked]
Vienna, Austria, Europe

---

From: "Lancaster, David Matthew" <[email-masked]>
Date: Fri, 19 May 2000 08:42:26 -0300 (ADT)

> Set the umask in /etc/profile accordingly (to 002 in your case).

AFAIK, /etc/profile would only be effective if you're running bash (not
everyone does) and is normally only executed when bash starts up as an
interactive login shell, which shouldn't affect afpd.
  man bash re:/etc/profile "By  default,  bash  normally reads
  these files when it is invoked as a login  shell"

D.

---

From: Patrik Schindler <[email-masked]>
Date: Fri, 19 May 2000 18:36:35 +0200

At 9:55 Uhr +0200 19.05.2000, Michael Paesold wrote:

>program, which would be a problem.

You're right.

>With common ftp servers there is an

UNfortunately there isn't such an option yet (AFAIK).

>For now I prefer the setgid solution.

This won't carry the g+w bit, anyway.

:wq! PoC

---

From: Patrik Schindler <[email-masked]>
Date: Fri, 19 May 2000 18:38:22 +0200

>interactive login shell, which shouldn't affect afpd.

You're right. But it helped me for creating group-writeable files from within afpd.

:wq! PoC