/web1/tmp/ full (cannot delete, cannot empty the folder)

Discussion in 'General' started by Fabian364, Apr 27, 2022.

  1. Fabian364

    Fabian364 New Member

    Hello,
    my website is giving below error:
    Code:
    Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/www/clients/client1/web1/tmp)
    From what i've understood this can be due to:
    1) lack of disk space
    2) lack of inode
    doing a df -h rules out option 1. So i'm assuming tmp is simply full. However i cannot delete the content (tried numerous commands to delete very large folders, none are working for my case). I tried to archive the folder (renaming it) and creating a new one, but "permission denied" even when sudo. Is there a way to do it via ISPconfig admin interface ?
    My other idea is to override php.ini settings and choose a new folder for session.save_path (probably a folder i create in web1/web/ as i cannot mkdir in /web1/, but that will probably be a security issue).

    Do you have any recommendation please ? i'm really stuck here...

    Thank you
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Verify with
    Code:
    df -hi
    file system has free inodes.
    You could paste here (in CODE tags) the output of df -hT. I am confused by your stament "tmp is simply full".
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    The session files are not in global /tmp folder anyway, they are in the website tmp folder already, so they are part of the website already. The error probably means that you reached website quota, set a higher quota for this website in ISPConfig.
     
  4. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    In addition to what @till said, don't do this:
    That is a definite security no-no, as you suspect.
     
  5. Fabian364

    Fabian364 New Member

    Hello @Taleman :
    df -hi
    Code:
    Filesystem     Inodes IUsed IFree IUse% Mounted on
    /dev/root        117M  667K  116M    1% /
    devtmpfs         2.0M  1.5K  2.0M    1% /dev
    tmpfs            2.0M     1  2.0M    1% /dev/shm
    tmpfs            2.0M  4.7K  2.0M    1% /run
    tmpfs            2.0M     8  2.0M    1% /run/lock
    tmpfs            2.0M    14  2.0M    1% /sys/fs/cgroup
    /dev/md4         128K    10  128K    1% /home
    /dev/md2         128K   334  128K    1% /boot
    df -hT
    Code:
    Filesystem     Type      Size  Used Avail Use% Mounted on
    /dev/root      ext4      1.8T   68G  1.7T   4% /
    devtmpfs       devtmpfs  7.8G     0  7.8G   0% /dev
    tmpfs          tmpfs     7.8G     0  7.8G   0% /dev/shm
    tmpfs          tmpfs     7.8G  168M  7.7G   3% /run
    tmpfs          tmpfs     5.0M  4.0K  5.0M   1% /run/lock
    tmpfs          tmpfs     7.8G     0  7.8G   0% /sys/fs/cgroup
    /dev/md4       ext4      485M  2.3M  454M   1% /home
    /dev/md2       ext4      487M   25M  433M   6% /boot
    Hi @till,
    are you talking about "hard disk quota" in ISPConfig ? if yes it is set to -1
    Below is the error message i get, mentioning global /tmp folder
    Code:
    Warning: Unknown: open(/var/www/clients/client1/web1/tmp/sess_gb70hvjaea38auukfboad859l4, O_RDWR) failed: Permission denied (13) 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 (/var/www/clients/client1/web1/tmp) in Unknown on line 0
    Thank you
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The message does not mention the global tmp folder, it mentions the tmp folder of that website. Did you maybe change PHP mode of that site recently or switched on/off suexec? As this can make existing old sessions inaccessible too and result in such an error message. In that case, delete all files in the mentioned tmp folder
     
  7. Fabian364

    Fabian364 New Member

    But that is is my issue: i cannot delete the files inside this folder. I cant even list it, it takes way too much time. And i cant delete the folder.
    ls -l /var/www/clients/client1/web1/
    Code:
    drwxr-xr-x  2 web1 client1       4096 Aug 20  2017 cgi-bin
    drwxr-xr-x  3 root root          4096 Apr 27 12:55 home
    drwxr-xr-x  2 root root          4096 Apr 28 04:26 log
    drwx--x---  2 web1 client1       4096 Aug 20  2017 private
    drwxr-xr-x  2 root root          4096 Apr 24  2020 ssl
    drwxr-xr-x  2 root root    1065357312 Apr 11 22:14 tmp
    drwx--x--x 40 web1 client1       4096 Mar 31 06:40 web
    drwx--x---  2 web1 client1       4096 Aug 20  2017 webdav
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

  9. Fabian364

    Fabian364 New Member

    so basically, i need to run this cmd ? prefer to ask as i dont want to delete all my site by mistake ;)
    Code:
    sudo find /var/www/clients/client1/web1/tmp/ -type f -delete
     
  10. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Why sudo? Log in as user of that website, that user can not delete files not belonging to that website. Small help at least, and it is better use root privileges only when needed.
    Otherwise that command seems OK, just leave out the sudo.
     
  11. Fabian364

    Fabian364 New Member

    thanks, it seems to be working fine now :)
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Btw. Which ISPConfig version do you use? If it's not 3.2.8p1, then you should update as there was an issue with deleting session files automatically a few releases ago.
     
    Th0m likes this.

Share This Page