0

I am having a problem utilizing a mounted drive on my Raspberry Pi 2B running Diet Pi.

dietpi@DietPi:/media/dietpi/Other$ sudo chmod 666 -R /media/dietpi dietpi@DietPi:/media/dietpi/Other$ touch text.txt touch: cannot touch 'text.txt': Permission denied dietpi@DietPi:/media/dietpi/Other$ 

The media appears to be mounted correctly as I am able to read what is in the drive.

Other Steps Attempted

sudo chown -R dietpi /media/dietpi 

This returns numerous of the following error:

chown: changing owndership '/media/dietpi/<file/dir>: Operation not permitted 
6
  • Check /etc/mtab or /proc/mounts - is it mounted rw? Commented Sep 17, 2024 at 2:08
  • 1
    Was the disk in question last used on a Windows system with the "Fast boot" setting enabled? The Windows "Fast Boot" (Windows defaults to "ON") setting leaves the disk partition in an undocumented, proprietary state that Linux isn't permitted to recognize. Boot back into Windows and disable "Fast Boot". Be prepared to have to re-disable "Fast Boot" - Windows updates have been known to turn it back on. See windowscentral.com/how-disable-windows-10-fast-startup Commented Sep 17, 2024 at 2:09
  • @waltinator These disks have only ever been utilized on Debian-based GNU/Linux systems Commented Sep 17, 2024 at 2:49
  • 1
    How exactly did you get it mounted? What's the filesystem type? Commented Sep 17, 2024 at 3:04
  • 1
    To check /proc/mounts, run e.g. grep /media /proc/mounts. The error message chown: changing ownership <path>: Operation not permitted is typical and expected for filesystems that cannot store Unix-style file permissions for individual files/directories. We need to identify the filesystem type (listed in /proc/mounts): for such filesystems, mount options can usually be used to adjust the permissions filesystem-wide, but those options are specific to each filesystem type/family. Commented Sep 17, 2024 at 4:33

1 Answer 1

0

By doing a recursive chmod 666, you have turned off the x (execute) permission bits on all the directories on the drive.  Try

find /media/dietpi -type d -exec chmod +x {} ';' 

If that results in permission errors, run it with sudo.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.