Gossamer Forum
Home : General : Perl Programming :

permission to create directories with scripts

Quote Reply
permission to create directories with scripts
I have a question related to a java client I am running my on my "virtual server". Our ISP is iserver.com. This isn't exactly Perl or CGI specific, but I've seen this happen with these scripts as well.

This java program is suppose to retrieve data from another server, create directories on our server and write html files in those directories. If I manually create the directories first, the program is able to write the html file. However, if any of the sub-directories do not exist the program cannot create the directories. It's a commercial program that has been tested to work in many enviornments.

We are running FREEBSD. Any ideas why the program wouldn't be able to create the directories?
Quote Reply
Re: permission to create directories with scripts In reply to
It's not running as 'you'

Scott
Quote Reply
Re: permission to create directories with scripts In reply to
Thanks. How do I run the program as me?
Quote Reply
Re: permission to create directories with scripts In reply to
That's a good question Smile

I don't know your system, and since I'm not really a 'guru' on Unix especially security, I'd hesitate to offer advice.

But here are a few clues from other scripts:

You could *try* to change the 'group' ownership to whatever the group of the webserver is. That might let it write to the directory.

You could also make sure the directory is chmod 777 if the webserver is running as 'nobody' or else it can't write to it.

Hopefully someone else knows more Smile



Quote Reply
Re: permission to create directories with scripts In reply to
Yep, CHMOD the remote direcotories to 0777 (rwxrwxrwx)


Regards,

Pasha

------------------
find.virtualave.net
Quote Reply
Re: permission to create directories with scripts In reply to
Thanks for the feedback. This script writes several directories down, before it places the html file. I know with Links, if I create the top level directory and CHMOD 777 for the top directory, Links is able to create directories below that (ie. categories).

However, with this program, it can only create the html file in the lowest directory. I can not just CHMOD 777 at the top level directory, because it still won't be able to create the sub-directories below this. Is that because of the way the code is written? Or is there some sort of security permission set on my server, limiting me?

Thanks.
Quote Reply
Re: permission to create directories with scripts In reply to
I'm *not* sure what you are saying at this point. What script is it?

It sounds like a permissions thing.

Check the links code to see how it creates and sets the permissions on files and directories. See if your script is doing something similar.