Creating new files

They have: 568 posts

Joined: Nov 1999

Is there a way Perl can create files in a directory without it being chmoded 777?

They have: 1,587 posts

Joined: Mar 1999

hmm, not that i know of, but i think u know more about perl than i do.

------------------
Thumbs up or down ratings of the best and worst ways to make $$$ on the net. CLICK 4 CASH! from Affiliate Programs and Ad Networks

Traffic-Website.com free traffic, affiliate programs, hosting, & domain names.
My Site got hacked, but i'm coming back?

They have: 122 posts

Joined: Jun 2000

If you put the user perl is running as into a special group, then you chmod 771 the directory, and chgrp the directory to that special group.

They have: 568 posts

Joined: Nov 1999

I never thought of doing that, thanks.

They have: 1,587 posts

Joined: Mar 1999

neato!

------------------
Thumbs up or down ratings of the best and worst ways to make $$$ on the net. CLICK 4 CASH! from Affiliate Programs and Ad Networks

Traffic-Website.com free traffic, affiliate programs, hosting, & domain names.
My Site got hacked, but i'm coming back?

They have: 122 posts

Joined: Jun 2000

doesn't that only work if you've got group or user write access to the files, in which case you wouldn't need to chmod it?

They have: 568 posts

Joined: Nov 1999

This is creating files

UNIX permissions only allow certain users to create files without chmoding them something else.

It's very weird.
When in doubt.. root

They have: 568 posts

Joined: Nov 1999

I thin i've found a way to do it but i'm wondering if it is really good for the system resources.

If I chmod the dir 777, then create the file it works fine. THen I change it back to 755 and no one will notice. BUT the question now is how system friendly is this?

This will only be creating about 1 file in possible 10 directories so i'm pretty sure it won't be a big strain. So is it secure?

Anyone of you big UNIX techie guys care to help me out a little?

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.