Not signed in (Sign In)

Categories

Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthortimberford
    • CommentTimeSep 25th 2005 edited
     # 1
    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.
    •  
      CommentAuthornathan
    • CommentTimeSep 25th 2005
     # 2
    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.
    • CommentAuthortimberford
    • CommentTimeSep 25th 2005
     # 3
    its a windows host. am i right in thinking the 777 thing is for linux permission settings?
    •  
      CommentAuthornathan
    • CommentTimeSep 25th 2005
     # 4
    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.
    • CommentAuthortimberford
    • CommentTimeSep 25th 2005
     # 5
    no worries nathan.

    it is extremely frustrating though!
  1.  # 6
    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...
    •  
      CommentAuthornathan
    • CommentTimeSep 25th 2005
     # 7
    Oh Mark!
    • CommentAuthortimberford
    • CommentTimeSep 25th 2005
     # 8
    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?
  2.  # 9
    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.
    • CommentAuthortimberford
    • CommentTimeSep 25th 2005
     # 10
    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.
    •  
      CommentAuthornathan
    • CommentTimeSep 25th 2005
     # 11
    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?
  3.  # 12
    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.
    • CommentAuthortimberford
    • CommentTimeSep 25th 2005
     # 13
    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.
    • CommentAuthortimberford
    • CommentTimeSep 25th 2005
     # 14
    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.
    •  
      CommentAuthornathan
    • CommentTimeSep 25th 2005
     # 15
    I'm glad it is fixed.

    Let us know if you require any further assistance.
    • CommentAuthortimberford
    • CommentTimeSep 25th 2005
     # 16
    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?
    • CommentAuthortimberford
    • CommentTimeSep 25th 2005
     # 17
    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?
  4.  # 18
    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.
    • CommentAuthortimberford
    • CommentTimeSep 26th 2005
     # 19
    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.
  5.  # 20
    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.
    • CommentAuthortimberford
    • CommentTimeSep 26th 2005
     # 21
    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!
  6.  # 22
    oh. that could be a point.
    I was working on the assumption you'd still be generating in the same dir you were reading from, just in non web accessible directories. I think. Or i just wasnt thinking.
    Let me find a more useful edit then...
  7.  # 23
    ok so i think the first step to solving this problem is altering the path variable before the thumbnail is generated.

    however, i don't really undestand how this is done, although I it's got to have something to do with this function...

    function GenerateThumbnail($ImageType, $SourceImage, $Path)

    which is around line 1296. I think it's taking the path from this function which is only a few lines before it...

    $this->GenerateThumbnail($this->GetFileType($this->CurrentBrowsingDirectory, $CurrentFileName), $CurrentFileName, $this->CurrentBrowsingDirectory);

    it would be most appreciated if someone with a better understanding of php could take a look at this.

    ideally i'd like the thumbnails to be generated into a folder named '_thumbs' that's held in the root of where all the images are stored.
    • CommentAuthorMinisweeper
    • CommentTimeOct 2nd 2005 edited
     # 24
    Based on your findings, try changing that to:
    $this->GenerateThumbnail($this->GetFileType($this->CurrentBrowsingDirectory, $CurrentFileName), $CurrentFileName, "/path/to/thumbnail/dir".$this->CurrentBrowsingDirectory);

    And then try changing in index.php:
    $ThumbPath = EncodeLinkUrl(FilePath("/same/path/here".$Path, "_thumb.".$Name));

    N.B the path you choose should be the *full* path just to make sure it works - and below your web accessible dir.
Add your comments
    Username Password
  • Format comments as