Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Write and execution permissions - filebrowser trouble

edited October 2005 in Vanilla 1.0 Help
My host (uplinkearth.com) are being particularly fussy about allowing execution permissions to files in a folder with write access enabled. When i requested they enable this for the installation of filemanager they said: "In general we require that you set up your application so that files needing execute permission are in one folder and files needing write permissions are in another." Does anyone know how I can get round this? How would it effect the installation procedure? Basically is it feasible? Any help would be much appreciated.
«1

Comments

  • What folder permissions were you planning on using? was it 777? If that is the case, then many hosts won't allow execution of php scripts, just liek you are describing. The filebrowser will work with 755 permissions, you might want to give that a go, or run it past your host. That is all that is needed for filebrowser. I think the insatll guides might still say 777. They used to for vanilla also, but I think that has been fixed already.
  • its a windows host. am i right in thinking the 777 thing is for linux permission settings?
  • That is right. *nix based systems use this type of permission settings. Sorry. I should not have assumed you were using linux or unix. I have NEVER used a windows host before. I am sorry, I can't offer any more suggestions on how to get around this. Sorry.
  • no worries nathan. it is extremely frustrating though!
  • timberford the best way i can think of getting round this is to move your images folder outside of the web accessible directory root and so you can have all the permissions you want on it. Then get filebrowser to reference that folder. How to do the latter part i'm still not entirely sure. Its definately possible, but when i asked mark about it he suggested i try and work it out myself. And i havent managed...
  • Oh Mark!
  • moving the images folder would be a bit of a pain though as it would break the src link to them that i have. do i only need execute permissions for the installation do you know? could i install filemanager outside the www root and then move it inside?
  • ahh yeah, i'd forgotten about src's. the reason you need write access is to create thumbnails. perhaps FB should have the ability to run these at a sub www directory. Alternatively, you could ask your host for these permissions temporarily while you generate them and then take them off. thats what i do. depends how often youre gonna be thumbnailing.
  • it's not the write access that's the problem though... i've got that set on the filebrowser folder. it's the execution in a write enabled folder that my host doesn't like. do you know if i need execute permissions only for the installation? thanks for your help.
  • AFAIK, you only need write permissions of you plan on using the thumbnailer. Other than that, you should be right. You can turn thumbnails off. Do you want to do that?
  • i'm probably overlooking something but i'm not sure why FB needs execution access atall. What does the installation actually consist of? As i remember it i just uploaded the files, edited the config slightly, and voila.
  • ok well this is really wierd... i was getting this error when visiting index.php with my filebrowser folder: You have attempted to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed. HTTP Error 403.1 - Forbidden: Execute access is denied. However, now I go there and it's all working fine!! As far as I know my host hasn't enabled the execution permissions, unless they have and didn't bother telling me! Either way at least it's going! Cheers for your help guys, although I am still wondering about this execution thing.
  • ok they just notified me that they've temporarily allowed the execute permissions. i'll be interested to see if it still works once they've removed them though. particularly the thumbnail generation.
  • I'm glad it is fixed. Let us know if you require any further assistance.
  • ok now they've disabled the executable permissions and it's no longer working! http://www.paulsturgess.co.uk/filebrowser/index.php i get errors about execte permissions being denied again!! I thought it only needed those for installation?
  • ok it's just clicked that with the write permissions enabled (for creating thumbnails) i cannot run *any* php files that reside in the same folder! hence the execution errors! is it viable to change where the thumbnails get generated to another folder?
  • yeah. See the thing is, in unix, 'execution' permissions are considered seperate (i believe, atleast) to whether or not php will execute. To stop php executing i think you need to play with the apache config for that directory. Obviously IIS works a little differently, or you and your host have your wires crossed regarding what both of you mean by execution permissions. Eitherway, you'll *need* php execution permissions in the folders. You'll just have to generate your thumbnails in a different directory and move them across or generate them while your permissions are relaxed and then they should still work alright once they've been tightened up. I think that the working directories should be a config option. Or something. Until then, you can change where the thumbnailer works by changing: $this->CurrentWorkingDirectory = getcwd(); to: $this->CurrentWorkingDirectory = "/full/path/to/thumbnail/dir"l Atleast i think that should work. Sorry i cant give you line numbers..i forgot how to get them without just randomely scanning but if you search for that first line in your thumbnailer.php you'll get it. If it doesnt (or does) work, get back to me.
  • cheers for the suggestions minisweeper. I'm definitely going to try and alter where the thumbnails are generated. I really don't want to have to wait on my host to enable permissions everytime i generate thumbnails. preferably i'd like to not have to then move all the thumbnails afterwards. surely it's possible to run fb with the thumbnails in a seperate folder. anyway i will look into it and let you know how i get on.
  • You'd think so, but i dont think it is. i'm pretty sure the fb just looks for thumbnails as _filename.jpg in the filename.jpg's dir but i havent checked that. If my idea for thumbnailing into a different dir works then i'll try and work out how to read them from that dir too for you.
  • ok i just had a look at thumbnailer.php and that line of code you mentioned... $this->CurrentWorkingDirectory = getcwd(); which is line 1408 ;-) unfortunately i havn't got time now to start getting my hands dirty so to speak. and i'm planning to build my new pc tomorrow night, so i wont get to look at this again for a while. but my first concern would be that the variable $this is used to search for the file, before creating a thumbnail version. so changing the path would mean it wouldn't be able to find the file? maybe i'm completely wrong here as i havn't had time to really get my head round how it generates the thumbnails but i thought i'd post my comments anyway!
This discussion has been closed.