Step 1 — Recreate the directory properly

SSH into your VPS and run exactly:

// bash terminal


mkdir -p /home/admin/tmp

Step 2 — Set correct permissions

Run:

chmod 733 /home/admin/tmp

Step 3 — Verify it exists

Run:

ls -ld /home/admin/tmp


Option 3 — Cron Job Auto-Recreate (Backup Protection)

If the host wipes the directory automatically, create a cron job to restore it.

Open cron:

crontab -e

Add:

*/5 * * * * mkdir -p /home/admin/tmp && chmod 733 /home/admin/tmp

This recreates the folder every 5 minutes if deleted.








Proper Permanent Fix (Keep Using /home/admin/tmp)

You need to tell systemd NOT to delete that folder.

1️⃣ Create a tmpfiles rule

Run:

sudo nano /etc/tmpfiles.d/admin-tmp.conf

Add this line:

d /home/admin/tmp 0733 admin admin -

Explanation:

Field	Meaning
d	create directory if missing
/home/admin/tmp	directory path
0733	permissions
admin admin	owner
-	no automatic deletion

Save and exit.

2️⃣ Apply the rule immediately

Run:

sudo systemd-tmpfiles --create
3️⃣ Verify
ls -ld /home/admin/tmp

You should see:

drwx-wx-wx admin admin /home/admin/tmp
4️⃣ Test cleanup safely

Run:

sudo systemd-tmpfiles --clean

Your folder should remain.




// That's all