No Permissions on External Hard Drive

I’ve configured my 2 external hard drives in the administrative side on (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.