Koozali.org: home of the SME Server

Permissions on virtual domains

crackerboy

Permissions on virtual domains
« on: February 17, 2007, 08:20:41 PM »
I run a couple of forums and i get The avatar filetype must be .jpg, .gif or .png when trying uploading avatar the folder has the permission 0777 and the ibay is set to admin and write group read everyone and the html folder is set to 2775 so what is wrong?

Its working fine on the primary ibay

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Permissions on virtual domains
« Reply #1 on: February 17, 2007, 09:17:15 PM »
Quote
i get The avatar filetype must be .jpg, .gif or .png when trying uploading avatar


Read the error.
The filetype HAS TO BE .jpg, .gif or .png it won't work wit .bmp, .jpeg or (god forbid) .exe  :D
"It should just work" if it doesn't report it. Thanks!

crackerboy

Permissions on virtual domains
« Reply #2 on: February 17, 2007, 09:56:38 PM »
if you dont understand you can try it yourself at http://lindsay-lohan.dyndns.org and the user is testbruker and the password is auft257 then you can try to upload your png,gif or jpg. the limit is 30000bytes and 100X100 then you will se it ghas to be with permission on the server

Offline pfloor

  • *****
  • 889
  • +1/-0
Permissions on virtual domains
« Reply #3 on: February 17, 2007, 10:16:11 PM »
Read your log files, you may find some "open_basedir restriction in effect" errors. if so, search for answers.

If not, post your errors so someone can help.

I am moving this to the contribs section, you will get more help there.
In life, you must either "Push, Pull or Get out of the way!"

crackerboy

Permissions on virtual domains
« Reply #4 on: February 17, 2007, 10:31:31 PM »
This is what i get from the log

Feb 17 22:24:43 sme HORDE[11975]: PHP Warning:  file_exists() [<a href='function.file-exists'>function.file-exists</a>]: open_basedir restriction in effect. File(/tmp/phpg7XLAB) is not within the allowed path(s): (/home/e-smith/files/ibays/fifth/) in /home/e-smith/files/ibays/fifth/html/phpBB2/includes/usercp_avatar.php on line 246

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Permissions on virtual domains
« Reply #5 on: February 17, 2007, 10:48:47 PM »
Ok you do have a permission problem.
I checked your forum and tryed to upload all of the filetypes. It said that the filetype is wrong. Then i have uploaded my avatar (or at least tryed and failed  :D  ) from my server to yours and i got a "Could not write avatar file to local storage." error so it seems that you do have permission problem.

You use a phpbb forum so make sure that you have set correct permissions for the folder images/avatars (777).
"It should just work" if it doesn't report it. Thanks!

crackerboy

Permissions on virtual domains
« Reply #6 on: February 17, 2007, 10:55:26 PM »
its 0777 on the avatar folder and tmp folder

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Permissions on virtual domains
« Reply #7 on: February 17, 2007, 11:07:09 PM »
Quote from: "bpivk"
Ok you do have a permission problem.
I checked your forum and tryed to upload all of the filetypes. It said that the filetype is wrong. Then i have uploaded my avatar (or at least tryed and failed  :D  ) from my server to yours and i got a "Could not write avatar file to local storage." error so it seems that you do have permission problem.

You use a phpbb forum so make sure that you have set correct permissions for the folder images/avatars (777).


No, 777 is always wrong (despite the fact that many howtos recommend it). 0770 is sufficient, as long as www is a member of the group owning the directory, and is safer.

Offline pfloor

  • *****
  • 889
  • +1/-0
Permissions on virtual domains
« Reply #8 on: February 17, 2007, 11:14:41 PM »
Quote from: "pfloor"
Read your log files, you may find some "open_basedir restriction in effect" errors. if so, search for answers.


I don't know how much clearer I could be here.  You have an open_basedir problem.  SEARCH for "open_basedir restriction in effect" and you will find this:

http://forums.contribs.org/index.php?topic=35423.0

And many other topics covering that particular problem.
In life, you must either "Push, Pull or Get out of the way!"

crackerboy

Permissions on virtual domains
« Reply #9 on: February 17, 2007, 11:17:47 PM »
Quote from: "CharlieBrady"
Quote from: "bpivk"
Ok you do have a permission problem.
I checked your forum and tryed to upload all of the filetypes. It said that the filetype is wrong. Then i have uploaded my avatar (or at least tryed and failed  :D  ) from my server to yours and i got a "Could not write avatar file to local storage." error so it seems that you do have permission problem.

You use a phpbb forum so make sure that you have set correct permissions for the folder images/avatars (777).


No, 777 is always wrong (despite the fact that many howtos recommend it). 0770 is sufficient, as long as www is a member of the group owning the directory, and is safer.


actually its root that owns the ibay

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Permissions on virtual domains
« Reply #10 on: February 17, 2007, 11:28:45 PM »
Well i don't use phpbb but i quoted from the install page of phpbb.com website. :)
But i agree that crackerboy should try the open basedir solution because i found some errors (eg: contact administrator error on some.php line xxx).
"It should just work" if it doesn't report it. Thanks!

Offline pfloor

  • *****
  • 889
  • +1/-0
Permissions on virtual domains
« Reply #11 on: February 18, 2007, 12:26:25 AM »
You need to look at the log files more carefully.  It clearly states that there is a problem with /tmp and not the ibay.

"File(/tmp/phpg7XLAB) is not within the allowed path(s): "

By default, a web application is not allowed to write to the /tmp directory.  Your application is trying to store (temporarly) the .jpg image in the /tmp directory to check, resize, create thumbnail, etc.  You need to allow this to happen.

Once the web app does it's thing, it will then move the .jpg to the avatar directory.
In life, you must either "Push, Pull or Get out of the way!"

crackerboy

Permissions on virtual domains
« Reply #12 on: February 18, 2007, 12:44:34 AM »
the path is /home/e-smith/files/ibays/fifth/html/phpBB2/uploads/user_avatars/tmp and not /tmp and i dont know how to fix it.

And i discover its affecting a orginal phpbbforum as this board and there its not a tmp folder that avatars is stored just /images/avatars

Offline pfloor

  • *****
  • 889
  • +1/-0
Permissions on virtual domains
« Reply #13 on: February 18, 2007, 01:00:39 AM »
Quote from: "crackerboy"
the path is /home/e-smith/files/ibays/fifth/html/phpBB2/uploads/user_avatars/tmp and not /tmp and i dont know how to fix it.

And i discover its affecting a orginal phpbbforum as this board and there its not a tmp folder that avatars is stored just /images/avatars

You are asking for help and when I give you the answer you tell me I'm wrong.

I have given you the answer to your problem, I don't know what else I can do for you here.

I suggest you go back and read all my posts again and follow the links and read the posts in those links, they should provide you with the solution to your problem.
In life, you must either "Push, Pull or Get out of the way!"

crackerboy

Permissions on virtual domains
« Reply #14 on: February 18, 2007, 01:12:36 AM »
Quote from: "pfloor"
Quote from: "crackerboy"
the path is /home/e-smith/files/ibays/fifth/html/phpBB2/uploads/user_avatars/tmp and not /tmp and i dont know how to fix it.

And i discover its affecting a orginal phpbbforum as this board and there its not a tmp folder that avatars is stored just /images/avatars

You are asking for help and when I give you the answer you tell me I'm wrong.

I have given you the answer to your problem, I don't know what else I can do for you here.

I suggest you go back and read all my posts again and follow the links and read the posts in those links, they should provide you with the solution to your problem.


You wrote You need to allow this to happen so how do i do that because i am new to linux and SME Server and i dont know how to fix it.

Its a great distro as its easy to add virtual domains but i need users to upload avatars :wink:

Do you host this forum on a SME Server ?

Edit found maybe the solution on http://forums.contribs.org/index.php?topic=21553.0 its OK to upload now so i guess its working