Please forgive the OT nature, but I just know you will be able to help.
I upgraded an old Mac I use as a server from 10.1 to 10.2.
After the upgrade, the webserver Documents folder had all the wrong
permissions. I had to log in via the terminal and CHMOD various
things. All is working well now, but not for *new* files.
Every new file I upload has the permissions "-rw-r-----" although the
enclosing folder itself is "drwxr-xr-x". I'm a bit confused about
this, and the more I read about UMASK the more confused I get.
Short version of question: how do I set the default permissions,
permanently, recursively, for all new files uploaded to
/Library/WebServer/Document/ ?
Other questions:
If I do a "rebuild permissions", will it fix this? Will it over-ride
various folders which are world-writable so I have to go back and
CHMOD again? Can I run "rebuild permissions" in Terminal or only from
the GUI?
And finally, if anyone's really annoyed by this being OT, where
should I go to ask for this kind of help in future?
------------------------------------------------------------
"Have You Validated Your Code?"
John Horner (+612 / 02) 9333 2110
Senior Developer, ABC Online http://www.abc.net.au/
------------------------------------------------------------
> Please forgive the OT nature, but I just know you will be able to help.
>
[quoted text clipped - 5 lines]
>
> Every new file I upload
upload from where and how?
> has the permissions "-rw-r-----" although the enclosing folder itself
> is "drwxr-xr-x". I'm a bit confused about this, and the more I read
[quoted text clipped - 8 lines]
> If I do a "rebuild permissions", will it fix this? Will it over-ride
> various folders which are world-writable
world writeable? whaddaya wanna doodatfer?
> so I have to go back and CHMOD again? Can I run "rebuild permissions"
> in Terminal or only from the GUI?
>
> And finally, if anyone's really annoyed by this being OT, where should
> I go to ask for this kind of help in future?
http://discussions.info.apple.com/
Admitted, it doesn't exactly look obvious, but if you go looking
starting here you can find a "unix" forum under both Panther and
Jaguar. (It's a little better hidden under 10.2.) If you look closely,
it's the same forum.
If you have a (free) developer account already, you can use the same
login name and password to post questions.
Not having done what you did, I'm not going to take a stab at your
other questions. But what does umask without any arguments tell you?
Something like 037 or 015?
--
Joel Rees
even though much of what I do is not sensible
it does make sense if you know why ...
John Horner - 05 Oct 2004 23:42 GMT
>>Every new file I upload
>
>upload from where and how?
From my desktop machine to the server, using FTP.
>>If I do a "rebuild permissions", will it fix this? Will it
>>over-ride various folders which are world-writable
>
>world writeable? whaddaya wanna doodatfer?
I have some folders within the webserver to which scripts write.
There's probably a more secure/sensible way to do it it know, but
it's my server and I know all the people who might use it and it's
inside the firewall etc etc.
Is it more sensible to write to a tmp folder outside the
web-accessible areas or something?
>what does umask without any arguments tell you? Something like 037 or 015?
It just says "2".
------------------------------------------------------------
"Have You Validated Your Code?"
John Horner (+612 / 02) 9333 2110
Senior Developer, ABC Online http://www.abc.net.au/
------------------------------------------------------------
John Horner - 06 Oct 2004 10:40 GMT
The problem is now fixed, thanks for your patience.
In case anyone needs to know, the problem is with the ftpd daemon;
for some reason after the upgrade its default umask was 002 when
previously it was 022.
The solution is to create, if it doesn't exist, a file at
/etc/ftpd.conf containing the line
umask all 022
and restart FTP sharing.