Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    How to allow scripts in one web site access files/dirs in another


    I have scripts on web site A that need to read/write/move files in web site B. Both are on the same server. (web site A is actually the forum.domain.com site of the www site.

    The forum has custom scripts that need to move files around and edit files inside the www site. The forum and www site are set up as separate sites in cPanel, and thus have separate users.

    I CAN set the files/folders I want to edit as chmod 777, but it's a pain in the butt to ftp in, switch them from 777, run the scripts, then switch them back to 644/755 (file/folder) after I'm done.

    Is there any way I can allow the forum scripts to edit files in www site while still leaving my files 644 and folders 777 ?

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,971
    There are two permissions systems for web files. The filesystem permissions you've already got down - and when you get the apache permissions set, you can probably revisit the filesystem ones to tighten things further.

    Apache permissions are defined in a <Directory ...> block inside the definition. You probably want to add one for the directory you want to manipulate inside your <VirtualHost ...> block for the www site. You can probably steal the equivalent block from your forum site virtual host definition.
    Linux user #126863 - see http://linuxcounter.net/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •