jargen Posted February 2, 2010 Share Posted February 2, 2010 Hi, I have got a ftp script. which backs up all the folders into a directory. That works fine but when i try to set the directory to behind the web root it dosent work. I need it to back it up into /whatever the file is in /var/www so i tried this "../../whatever" but it didnt work. if i set it to "whatever" it works fine (but the folder is in /var/www (/var/www/whatever)) when i need it in /whatever. Any help. Thanks Quote Link to comment Share on other sites More sharing options...
PHP Monkeh Posted February 2, 2010 Share Posted February 2, 2010 Have you just tried setting it to: '/whatever' ? That should (if you're allowed) access the 'whatever' directory from the filesystem root. Quote Link to comment Share on other sites More sharing options...
jargen Posted February 2, 2010 Author Share Posted February 2, 2010 it just makes the folder in the directory the file is in. Quote Link to comment Share on other sites More sharing options...
akitchin Posted February 2, 2010 Share Posted February 2, 2010 have you created the "/whatever" folder where it should be, and properly set permissions for it? if so, i would guess that it has something to do with the user that the FTP script is operating as not having appropriate permissions to access directories above the web root. Quote Link to comment Share on other sites More sharing options...
jargen Posted February 2, 2010 Author Share Posted February 2, 2010 I dont need to create the /whatever folder the script does that automaticly. I just cant make it do it in the correct place Quote Link to comment Share on other sites More sharing options...
akitchin Posted February 2, 2010 Share Posted February 2, 2010 my point was that perhaps the script doesn't have the appropriate permissions to create the folder at that level. it might be worth creating that directory with the appropriate permissions manually and trying the script again. Quote Link to comment Share on other sites More sharing options...
jargen Posted February 2, 2010 Author Share Posted February 2, 2010 what permissions would it need? ive made it have 777 Quote Link to comment Share on other sites More sharing options...
jargen Posted February 2, 2010 Author Share Posted February 2, 2010 Aha sorted it. Needed to change the permissions on the root dir Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.