1

My Debain server created a session in private tmp folder /home/user/tmp the temp folder owner:

drwxrwxrwx 2 user www-data 4096 2011-08-23 16:26 tmp

After the session created, the session detail:

-rw------- 1 user user 0 2011-08-23 16:30 sess_66nnga09kav0747k5ek95ghne2

I added the user to www-data group but still cannot use the session. I got following error message:

Warning: Unknown: write failed: Disk quota exceeded (122) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/home/user/tmp) in Unknown on line 0

If I changed the owner of session to

-rw------- 1 user www-data 84 2011-08-23 16:35 sess_66nnga09kav0747k5ek95ghne2

I can pass the session. Can I force the session file with specified owner??

5 Answers5

2

The error message says you have exceeded your disk quota. Free up some space.

Warning: Unknown: write failed: Disk quota exceeded

Mehmet
  • 396
  • 1
  • 6
0

You need to change under which effective group and user apache works.

sanmai
  • 521
  • 5
  • 19
  • can any method that make me force the session file with owner user:www-data?? –  Aug 23 '11 at 08:57
0

The problem is that apache is not alowed to write in the directory /home/user/tmp. You can do the followings:

  • change the owner of that directory to www-data (the apache's user)

or

  • I changed the owner to user:www-data, but still cannot. It can create the session file but output owner: user:user. I changed the file to user:www-data, it's work –  Aug 23 '11 at 11:10
0

You don't need to be in apache 's group. You need to add apache into to your user group.

Remember apache needs to be able to access every folder in the path you specify, not just the directory itself.

James Swift
  • 144
  • 1
  • 14
0

This should be a comment, but its a bit long.

If this is your server, then it should not be writing files in /home (it shouldn't be writing session files in /tmp either). If your PHP wrote the file then it must have the permission to read the file (there are exceptions to this but they need to be explicitly enabled for very specific purposes which do not apply here). If it wrote the file, the file would not be owned by "user" unless the daemon is running as "user". Maybe you are changing the details you see on your system for some reason, if so its not helping to diagnose what's going on here. Maybe this is not really your server but rather a shared server you have access to. Maybe its been really badly configured. Certainly the sessions should not be stored in a directory with 777 permissions.

The error indicates a quota problem. Start there.

symcbean
  • 19,931
  • 1
  • 29
  • 49