Jump to content

Problems With .htaccess?


Recommended Posts

I am having a problem trying to setup a php script that needs to do simple file copy/edit/delete in a sub-directory on one of my sub-domains.


When I look at the owner of the directory it shows as the top-level username of my account instead of "nobody" which I would expect.


So, what name does Apache http run under (I assumed it was "nobody") and how can I specify (using /.htaccess) that threads executing under that process have the ability to modify/create/delete files in that directory?





Link to comment
Share on other sites

Apache does run under the user "nobody". You would have to make the directory world writeable to allow an apache process to write to it.


The only other option would be running PHP as a CGI that is suExec'd, but I'm not sure that's possible in the TCH configuration (or desired).

Link to comment
Share on other sites

Ok. SO temporarily making the directory writable by everyone I can copy and modify those copied files.


Since I really don't want that directory to be wide open like that, is there any way to do a "chown" to user '99' on those files/directory so that only user needs r/w/e priveleges and not world?


I am not a *nix expert and know next to nothing about Apache.





Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...