Contents
The site works, but when a user uploads a photo or a PDF through a form on your site, an error appears, or the app says “uploaded” and nothing is saved. This page is about uploads from inside your site. For uploading your site’s own files to the hosting, see ZIP upload or extract fails.
The messages you see
move_uploaded_file(uploads/photo.jpg): Failed to open stream: Permission denied
move_uploaded_file(): Unable to move '/tmp/phpA1b2C3' to 'uploads/photo.jpg'
Unable to create directory wp-content/uploads/2026/11. Is its parent directory writable by the server?
EACCES: permission denied, open '/home/myuser/app/uploads/photo.jpg'
ENOENT: no such file or directory, open 'uploads/photo.jpg'
If nothing shows on screen, look under Metrics → Errors in cPanel or in the error_log file in the site’s folder.
Causes, most likely first
1. The upload folder does not exist on the server
Git does not store empty folders and some ZIP tools skip them, so the project arrives without uploads. ENOENT or No such file or directory means exactly that. Create the folder in File Manager with + Folder, exactly where the code expects it, minding letter case (Uploads is not uploads). To stop it happening again, put an empty .gitkeep file inside.
2. Folder permissions do not allow writing
Select the folder in File Manager and choose Permissions. It should be 755 (owner can read, write and enter). A folder at 644 or 555 cannot be written to. File Manager’s Permissions action does not apply to subfolders, so set uploads/2026 and the like separately. Over SSH:
find ~/public_html/uploads -type d -exec chmod 755 {} \;
find ~/public_html/uploads -type f -exec chmod 644 {} \;
The numbers are explained in file permissions and the chmod calculator.
3. A path from your computer or an old server
Code such as C:\xampp\htdocs\site\uploads\ or /var/www/html/uploads does not exist in your account, and may show up as an open_basedir restriction. Build the path from the file’s own location:
$target = __DIR__ . '/uploads/' . basename($_FILES['photo']['name']);
In Node.js use path.join(__dirname, 'uploads') instead of a relative path, because the working directory under Passenger can differ from the file’s folder.
4. Files owned by another user
After moving a site from another server with non-cPanel tools, some folders can stay owned by a different user. If File Manager shows an owner other than your account name, permissions alone will not fix it; contact support to correct ownership. See Permission denied writing files.
5. Not permissions: size or disk space
- Only large files fail:
upload_max_filesizeandpost_max_size. See upload_max_filesize and 413 error. - Every write suddenly fails: the disk is full; see disk quota exceeded.
- The image is saved but does not show in Laravel: see storage:link.
WordPress
Unable to create directory wp-content/uploads/... means wp-content/uploads is missing or not writable. Set it to 755, and under Settings → Media make sure the upload path field is empty or correct: migrated sites sometimes keep the old server’s path. For HTTP errors while uploading images, see HTTP error when uploading images.
How to confirm it is fixed
Upload a small file through the form, then open the folder in File Manager: the file should be there with permissions 644, and its URL should open in the browser.
On ArabyHost
Every account is isolated with CloudLinux CageFS and PHP runs as your account user, so 755 and 644 are enough without 777. You set permissions in File Manager from the panel, and the Araby AI assistant reads the error log and points to the folder that needs fixing. You can change PHP upload limits yourself; commands such as find and chmod are available over SSH on AI/Developer plans.
FAQ
Should I set the uploads folder to 777 to make it work?
No. On cPanel hosting with CloudLinux, PHP runs as your account user, so 755 is enough to write. 777 opens the folder to any process on the server, and the server may refuse it outright with a 500.
Small images upload but large ones fail. Is that permissions?
No. That is PHP's size limit, upload_max_filesize and post_max_size, or a limit in the code. Raise both under Select PHP Version, Options.
How do I find the full path of the upload folder on the server?
Your account path starts with /home/your-username. In PHP, build paths with __DIR__ relative to the current file, so moving the site does not break them.