Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2009
    Location
    Texas
    Posts
    31
    Thanks
    1
    Thanked 2 Times in 2 Posts

    mkdir ftp & linux

    Hello everyone, I'm trying to finish setting up my linux server and everything is going well, apache, php, mysql, and ftp, except php and ftp dont like each other, when i create a folder in php using mkdir it makes it fine but sets the owners to apache when the ftp user is vsftpd and requires that to be able to edit or delete them or i need to set the permissions to allow anyone to access the files to be able to read and write but cannot get it to work right, does anyone have any ideas?

  • #2
    New Coder
    Join Date
    Mar 2010
    Location
    Virginia, USA
    Posts
    25
    Thanks
    0
    Thanked 5 Times in 5 Posts
    Hello. Sounds like you got some umask work to do - but first the easy solution.

    You should be able to call PHP functions chmod and chown immediately after the creation of the directory.

    Make sure PHP security is not interfering via safe_mode or open_basedir.

    You can use chmod to make the directory world-writable (if that's not a security concern) or change the directory owner to vsftpd.

    An Apache solution is to modify the default umask. This is done by adding the following line to the envvars files for Apache (location depends on your Linux distribution):

    umask 0000

    Effectively setting the default permissions for new files/folders to world-writable (again - if this is not a security concern in your environment).

    Let me know if you need more specifics.

  • #3
    New Coder
    Join Date
    Mar 2009
    Location
    Texas
    Posts
    31
    Thanks
    1
    Thanked 2 Times in 2 Posts
    thanks alot for the quick response, once i get home i will try this out, thanks alot


  •  

    Tags for this Thread

    Posting Permissions

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