• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1216
  • Last Modified:

mkdir permissions problem with perl

Testing the following perl code with local linux and apache
1.3.6 server allows creation of directories with permissions
of 755 but not 777, and on the apache 1.3.4 server of my webhost, it seems limited to a permission of just "4" for 'other'...ie, directories always result with permissions of
rwx-rx-r, and not rwx-rx-rx...This is the code, and thank you for your help:
chdir('../../public_html');
chdir($cat);
chdir($sub);
mkdir($lgn,0755);
0
leehinkleman
Asked:
leehinkleman
1 Solution
 
geoff2000Commented:
It is most likely due to your current umask.
It's best to leave your umask as it is and just use the chmod functions after mkdir.
0
 
leehinklemanAuthor Commented:
Geoff:
chmod(0777, $lgn) worked on both local linux, and on my webhost.
Thanks very much.
Sincerely,
Lee Hinkleman
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now