Hi, I've decided to try to make my life easier by automating tasks with php scripts and an html interface. I want to do things like: - automate setting up of directory structures for new projects, - import into svn, then checkout, - and the like and I've got stuck on the first line of code: mkdir()! - Permission denied. I realise now that I need to run php scripts as a different user, but without complicating things by having to (re)compile things or anything like that! Any ideas? cheers!
Are you on linux? Sounds like you don't have the appropriate permissions to create a directory. Maybe you can run them under sudo permissions? Just a thought http://www.gratisoft.us/sudo/man/sudo.html I think that should do the trick. It lets you run files as another user which sounds exactly what you are asking for
You need a permission (775) for parent directory (directory above the newly created directory) to create subdirs in it.
Thanks for the responses - just thinking though, is sudo a good idea? I was planning on running as a particular user, the one which is limited to the directories & docs I'm interested in etc. Thanks for the tips, I'll try to see what I can manage with sudo although I haven't used the command line much in recent months so easily forget pretty much everthing lol so might have to ask for examples! Yes it's linux - ubuntu - cheers