Find the answer to your Linux question:
Results 1 to 5 of 5
I have a directory set up with chmod 0755 (I think..it's drwxr-xr-x either way) I want this this way so that no other users can upload/edit files, but I need ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Oct 2006
    Posts
    109

    Question php write access...


    I have a directory set up with chmod 0755 (I think..it's drwxr-xr-x either way)

    I want this this way so that no other users can upload/edit files, but I need PHP to be able to upload files from HTML forms into this directory...how can I only add permissions to PHP without giving other groups and users access??

  2. #2
    Linux Newbie
    Join Date
    Jan 2007
    Location
    Cupertino, CA
    Posts
    157
    Have the user that will run php processes be in a group of its own and make this directory belong to that group and make the directory group writable. You can do pretty complicated access management stuff using groups. Look into how gpasswd works if you want a user to belong to more than 1 group...

  3. #3
    Linux Newbie
    Join Date
    Oct 2006
    Posts
    109

    Question

    One other question I do have...I installed PHP and MySQL when I installed FC 6, so I don't know a whole lot about that installation process..both are working indepedently of each other. How do I enable the mysql extension in the php.ini file??? I can't find a mysql.so or .dll file on my system, there's not even a mysql directory in /etc...any ideas??

    Also, how do I find out which user/group is running PHP??

  4. #4
    Linux Newbie
    Join Date
    Jan 2007
    Location
    Cupertino, CA
    Posts
    157
    Sorry. Dont have much clue there. Perhaps you should start a new thread for this.

  5. #5
    Linux Newbie
    Join Date
    Dec 2006
    Posts
    105
    I think you can do it by giving 777 permission during upload and change it to 775 after it gets completed....
    Unix, Linux tips...

Posting Permissions

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