Results 1 to 4 of 4
Hybrid View
-
07-31-2005, 10:31 AM #1DigitalPunchCardMaker
- Join Date
- Oct 2004
- Location
- Moji
- Posts
- 2,107
Need some help on apache permissions
Hi,
I am kind of new to the apache , so I don't have any idea even if this can be done.
Let me briefly explain what I want to achieve:
I have a centOS 3.5 server with apache 1.3, and cPanel/WHM installed.
There is a sub-directory in each users directory:
/home/username/.autorespond
contains autoresponder messages.
and there is another directory:
/etc/valiases
which contains mail-forwarding, autorespond information for each account.
I wrote some PHP scripts that modifies, creates those files, and creates autoresponder messages, and forward aliases for e-mail accounts.
However, my scripts cannot access those folders/files unless they're chmod'ed to 777. But I am sure there is a reason that those folders are NOT set to 777 by default. (security? )
Basicly, what I need is to be able to run my scripts (lets say: /home/mainuser/www/dothis.php) in any folder of the server. Maybe give the mainuser some kind of super-user privilages that can read and write any kind of folder.
Any help greatly appreciated...
Regards
-
07-31-2005, 11:00 AM #2Disabled
- Join Date
- Jul 2005
- Posts
- 141
Well, if you have cPanel/WHM - for new users, there's an cpanel3-skel/ folder in /root. You can stick an .autorespond file in there, and it'd copy that file into a new user's folders.
It's kind of a security risk if you let your script run as root.
Or, you can do the above, but have .autorespond file empty, but chmoded to 777 - and have your script access it normally.
-
07-31-2005, 11:15 AM #3DigitalPunchCardMaker
- Join Date
- Oct 2004
- Location
- Moji
- Posts
- 2,107
Thanks kijit,
One question:
If I change/delete/update the files in cpanel3-skel folder, will cPanel update the user's directory as well?
Or the cpanel3-skel folder is used only when a new account created?
-
07-31-2005, 11:25 AM #4Disabled
- Join Date
- Jul 2005
- Posts
- 141
It's only used when a new account is created.