No Permissions on External Hard Drive

Iā€™ve configured my 2 external hard drives in the administrative side on https://192.168.0.10/ (my nextcloudpi IP) however it continuously says I donā€™t have permissions.

how did you format them? in which format?

BTRFS theyā€™ve been formatted via the nextcloud GUI, and Iā€™ve started uploading things. Now Iā€™m having trouble moving things from ā€œ/media/8TB/Folderā€ to ā€œmedia/8TB/Folder/Folderā€ with ā€œFolderā€ being the name of a personal folder. Also when uploading files to ā€œmedia/8TB/Folder/Folderā€ I get an ā€œunknown error has occurredā€.

Iā€™ve readjusted the permissions of nextcloud via
chown -R www-data:www-data nextcloud
find nextcloud/ -type d -exec chmod 750 ā€˜{}ā€™ ;
find nextcloud/ -type f -exec chmod 640 ā€˜{}ā€™ ;
chmod g+w nextcloud/config
chmod g+w nextcloud/config/config.php
chmod g+w nextcloud/apps

Iā€™ve also adjusted the permissions of the external drive via
chown -R www-data:www-data /media/8TB
chown -R 750 /media/8TB

Iā€™m familiar with CMD and Powershell but this is completely new to me, please go easy on me :stuck_out_tongue:

Update 1.29.20:
I was able to move the ā€œ/media/8TB/Folderā€ into ā€œ/media/8TB /Folder/Folderā€ after running the following:
sudo find /media/8TB -type d -exec chmod 750 ā€˜{}ā€™ ;
sudo find /media/8TB -type f -exec chmod 640 ā€˜{}ā€™ ;

Now, it says I donā€™t have permissions to create folders or upload items to ā€œ/media/8TBā€. Once the file finishes moving Iā€™ll run:
sudo find /media/8TB -type f -exec chmod 750 ā€˜{}ā€™ ;

And see if that fixes the problem.

chown is just a typo (instead of chmod), correct?

640 is fine to use for files, ā€œexecuteā€ permissions shouldnā€™t be needed. Donā€™t use 750 on files if not needed.

Are you able to find and post the log entry regarding this event (remove sensitive info if necessary)?

How did you configure the external hard drives in the GUI? Using ā€œexternal storageā€ app?
If yes, is the ā€œread onlyā€ option unchecked?

Unfortunately no, I was using chown. Now I know the difference between chown, and chmod. Iā€™m not sure how to find logs to be honest. If you can direct me how to Iā€™ll post them.

Current Status: I am able to upload files, however it continuously gives me the error "unknown error has occurredā€ while uploading files. It worries me that the entire folder system Iā€™m uploading doesnā€™t completely upload, but checking just the file size everything seems correct.

You can use the web UI to view Nextcloud logs in Settings/Logging or view the entries directly in NCā€™s log file. You should find it in the nextcloud ā€œdataā€ folder.

Also make sure your external drives get enough power, RPis do not supply a great amount of power to USB. Even RPi4 with a good power supply. Theoretical power needs and theoretical power output can be ok in theory, but drives can have higher power consumption peaks.

And check your system logs, too. journalctl -f will give you a live view of system events, while you try to upload files. There are some chipsets in external drive enclosures that have issues. These errors should be visible in the system log.

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.