Where:
new_dir_name is obviously the name for the new dir
MODE is a string defining the permissions for the new dir.
EXAMPLE:
mkdir this_dir, 777;
Note that the MODE is modified from what you ask for by the current UMASK. This enforces a security layer that can be used by the system to prevent the creation of wide-open permissions on everything you create. If your current umask is 011, then the 777 will turn into 766 when the dir is created.
All that having been said(typed), I'd bet your problem is insufficient permissions to create the new dir. Two cases usually show up. (1) You can't create the dir - you don't have permissions OR (2) you can create the dir but it shows up with permissions other that the MODE you requested - blame umask. If you are doing this with CGI, then make sure the parent directory you are trying to write (create a sub-dir) in has sufficiently loose permissions to let the web daemon to create the new dir. 'hope this helps
If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.