REQUEST: mkdir command, added features

Client feature requests, product gripes, and other general questions.

Post Reply
Brendon K
Posts: 139
Joined: Mon Aug 15, 2005 8:16 pm

REQUEST: mkdir command, added features

Post by Brendon K »

I just ran across this today accidentally...

Would it be possible (eventually, not a highly necessary piece of code here) to allow for setting the default parameters on the mkdir command?

Namely, -p and -m
-m mode
Set the file permission bits of the newly-created directory to the specified mode value. The mode option-argument shall be the same as the mode operand defined for the chmod utility. In the symbolic_mode strings, the op characters '+' and '-' shall be interpreted relative to an assumed initial mode of a= rwx; '+' shall add permissions to the default mode, '-' shall delete permissions from the default mode.
-p
Create any missing intermediate pathname components.

For each dir operand that does not name an existing directory, effects equivalent to those caused by the following command shall occur:

mkdir -p -m $(umask -S),u+wx $(dirname dir) &&
mkdir [-m mode] dir

where the -m mode option represents that option supplied to the original invocation of mkdir, if any.

Each dir operand that names an existing directory shall be ignored without error.
The setguid option for folders is extremely handy when using a server that multiple people have access to (i.e.: business, organization, etc...). Although this could easily be set in a umask on the server by an admin, some admins are lazy (aka, mine). This would make things a bit easier upon the creation of a directory if we could auto-set (via preferences/options) per site, how directories are created by default.
Brendon K
Posts: 139
Joined: Mon Aug 15, 2005 8:16 pm

Post by Brendon K »

Ah, okay. No harm no foul for trying to at least think about it. I'm not too familiar with the FTP protocol. Seeing all the commands flying all over the place in my log file just made me assume that it uses the same commands from the OS shell. Sorry!
Post Reply