CHMOD in Perl failure
I am attempting at writing a script that creates a directory, then creates a file in that directory, and then chmods them.
Thus far the script successfully creates the file and directory, but the chmod command is failing, but does not die. I don't understand. Here follows my code:
code:
chmod (755, $file_path, $dir) | | die "failed chmod Reason: $!"; [/code] Currently, the files remain at what seems like 0 permissions. :-( Thanks a lot. Richard ------------------ [email protected] "I'm so wracked with guilt. I don't want to stop therapy because I'm afraid to take the income away from my therapist. He's got kids in college." -- Tim Halpern
Everyone here has a website. It's just that not all are worth posting (Mine! ).
Orpheus posted this at 21:00 — 11th May 2000.
They have: 568 posts
Joined: Nov 1999
CGI scripts execute as user "nobody" if the server admin didn't want that user to have the ability to chmod files then he could set it to that.
richjb posted this at 13:22 — 12th May 2000.
They have: 193 posts
Joined: Feb 2000
I made the script do a whoami call and print it out, the results are my name; so they should be executed under my rights. If there is not syntax error, then I will contact my host.
Thanks,
Richard
------------------
[email protected]
"I'm so wracked with guilt. I don't want to stop therapy
because I'm afraid to take the income away from my therapist.
He's got kids in college."
-- Tim Halpern
[email protected]
Everyone here has a website. It's just that not all are worth posting (Mine! ).
hcshim posted this at 21:54 — 18th May 2000.
They have: 20 posts
Joined: May 2000
Can you post the error message in your error log file so that we can help you better?
richjb posted this at 17:23 — 19th May 2000.
They have: 193 posts
Joined: Feb 2000
Tanks for your insterest in helping, but I figured out the problem.
Instead of:
[email protected]
Everyone here has a website. It's just that not all are worth posting (Mine! ).
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.