0

hello and good day hope you are all well!

newest update: Now i have created a second installation with partly other conditions:(haviing permissions 755 with user vhost: www on /home/vhost/WWW/campus-24.com/sites/default The selected file xxxxx could not be uploaded. Only JPEG, PNG and GIF images are allowed. Well this is a new error - i had not this error before - what can i do. Guess that i have a made a big step... what do you think!?

Here the original-thread-start: just installed a drupal -commons version 6x 24:

when i try to upload images i get errors - and after doing some search in the system and the adminstration-controll i fould out: the reported error

image upload is not possible - in drupal-commons version 6x 24 {released on jan 18th ): i have done some research and found out that i have: 755 - in directory sites/default/files

Allthough i have the permisssions set to 755 -

what can i do here - just lemme know!

The directory sites/default/files is not writable see the path where i i have recogniczed the error

http://schulcenter.org/?q=admin/build/themes/settings

The directory sites/default/files is not writable

Well what can i do here?!

update: thx alexandru and Mpd - thx for the answers; well everytime i touch the permissions i get lost.- (i have troubles n issues with permissions and file users. see here https://superuser.com/questions/382792/setgid-bit-always-unset-when-changing-file-permissions hmmm - well MPD guess that you are right and i am pretty lost -here . what can i do now??

3

You have to set files directory permissions to 777 to make it writable by "others". As I understand you set it to 755 and expect to be writable? 755 means all for the owner, read and exec by group and read and exec by others.

EDIT: As MPD said, if the owner of the files is same user as the one apache runs as than files directory doesn't have to be 777. 755 is enough and it is also recommended.

  • 2
    This isn't really true. sites/whatever/files can be 755 as long as it is owned by the user that Apache runs as (eg, apache, www, or nobody). In fact, it can be argued that 777 is a security concern. – mpdonadio Feb 2 '12 at 18:43
  • 1
    Before I run install.php, I chown -R apache.apache docroot/. When that is done, I chown -R someuser.someuser docroot/ and chown -R apache.apache docroot/sites/default/files. Typically, someuser is the same user I drush and ssh as. – mpdonadio Feb 2 '12 at 20:15
  • 1
    What OS are you running? Also, I believe it should chown -R apache:apache docroot instead of chown -R apache.apache docroot On my install of Ubuntu the command is sudo chown -R www-data:www-data /var/www/ Obviously the users and directories would need to match your setup, but do replace the . with a : See: en.wikipedia.org/wiki/Chown – Citricguy Feb 3 '12 at 4:33
  • 1
    @Citricguy, chown usually works with both . and : Using a colon is a somewhat recent change. The original BSD version of the command used . but modern OS allow . in usernames, hence the change to : Old habits die hard... – mpdonadio Feb 3 '12 at 14:13
  • 1
    Sorry for the late reply! @MPD indeed you don't need 777 if the owner of the files is the same user as the one that Apache runs as. I'll edit the question to reflect this. zero, did you manage to fix it eventually? – Alexandru Savin Feb 3 '12 at 15:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.