I’m attempting to make a script that creates directories on a bsd
server.
#needs write privs to the server(for uploading from web)
/upload
#just write to owner
/htm
For the first, i’m using
owner - all privs = 07
group - read,write = 6
other - read = 4
Dir.mkdir(‘upload’, 0764)
Which, when looking at with ls -al
shows
drwxr–r--
all privs to owner, read to group and nothing to other
This seems to work ok for files, just not dirs.
What mask do i need to allow the server to write to dirs??
//from doc
//Higher-order bits may also be used to indicate the type of file
(plain, //directory, pipe, socket, and so on)
What higher-order bits?
Someone clue me if you have a chance.
Paul
/* -----------------------------cut from docs
In this section, permission bits are a platform-specific set of bits
that indicate permissions of a file. On Unix-based systems,
permissions are viewed as a set of three octets, for the owner, the
group, and the rest of the world. For each of these entities,
permissions may be set to read, write, or execute (or search, if a
directory) the file:
*/
Is your umask causing the problem? I know mine is set by default to
0022, so it would mask off the group/world write bits.
“%04o” % File.umask
==>“0022”
File.umask 0
==>18
“%04o” % File.umask
==>“0000”
HTH,
–Mark
···
On May 17, 2004, at 6:38 PM, paul vudmaska wrote:
I’m attempting to make a script that creates directories on a bsd
server.
#needs write privs to the server(for uploading from web)
/upload
#just write to owner
/htm
For the first, i’m using
owner - all privs = 07
group - read,write = 6
other - read = 4
Dir.mkdir(‘upload’, 0764)
Which, when looking at with ls -al
shows
drwxr–r–
all privs to owner, read to group and nothing to other
This seems to work ok for files, just not dirs.
What mask do i need to allow the server to write to dirs??
Mark Hubbart discord@mac.com wrote in message news:1DE91023-A86D-11D8-AE47-000502FDD5CC@mac.com…
···
On May 17, 2004, at 6:38 PM, paul vudmaska wrote:
I’m attempting to make a script that creates directories on a bsd
server.
#needs write privs to the server(for uploading from web)
/upload
#just write to owner
/htm
For the first, i’m using
owner - all privs = 07
group - read,write = 6
other - read = 4
Dir.mkdir(‘upload’, 0764)
Which, when looking at with ls -al
shows
drwxr–r–
all privs to owner, read to group and nothing to other
This seems to work ok for files, just not dirs.
What mask do i need to allow the server to write to dirs??
Is your umask causing the problem? I know mine is set by default to
0022, so it would mask off the group/world write bits.
“%04o” % File.umask
==>“0022”
File.umask 0
==>18
“%04o” % File.umask
==>“0000”
HTH,
–Mark
Mucho, mucho, thanks Mark, using File.umask 0 worked. Now i need to figure out why.
:P, thanks again.