1

I have a problem with a hard drive mounted on /media/data.

This drive is mounted by means on the following command in the /etc/fstab file:

/dev/sda7 /media/data ntfs user,nosuid,exec,nodev  0  0

The partition is mounted and there is no problem using everything (working with documents, viewing movies, deleting files, moving files from any other space to this drive...). The problem is on the mode of all the files and folders in the hard drive, including the folder where it is mounted (/media/data). If I run ls -la in the media folder I get the following for this folder:

drwxrwxrwx   1 root root 8192 Jun 30 18:20 data

and the terminal displays it this way (I have the force_color_prompt=yes in my ~/.bashrc file). my folder view in color terminal:

enter image description here

while if I do the same in the home folder, I get:

drwxr-xr-x   2 apalomer apalomer    4096 Jul 11  2015 Public

and it is displayed this way.
normal folder view on color terminal:

enter image description here

As you can see, there is an obvious difference. Basically what happens is that all the files and folders in /media/data are drwxrwxrwx or -rwxrwxrwx (depending on weather or not they are directories) rather than drwxrwxr-x or -rwxrwxr-x as the ones I've created in the home folder are.

I don't know if this problem is related to how I mount the drive or the fact that some day I did something not really inteligent like (or at least it does not seems right now that I am a better ubuntu user, I don't remember when or what the command whas exactly):

sudo chmod 777 /media/data

To solve this, I've tried changing the permissions individually by using:

sudo chmod --reference=

giving any file or folder in the home directory as reference. I've also tried to set the mode of the files manually using:

sudo chmod 775

for both, files and folders. However the files and folders do not change their permission. The only way I've succeed to change the mode is (and I've tested only with one file) by coping the file to the home directory, an then changing the mode there. However, as soon as I put this file back in its original place in /media/data it recovers the old mode.

Any idea on how to solve this issue?

Thanks!!

EDIT

In adition to the commets made by @Rinzwind. I've found this. By mouting the partition as it is explained here, hence changing the options in /etf/fstab from the above to the follwing ones:

/dev/sda7 /media/data ntfs-3g uid=1000,gid=1000,umask=0022,sync,auto,rw 0 0

I've solved the issue of the dipsplay:

enter image description here

and now it is displayed as like this:

enter image description here

apalomer
  • 285
  • 1
    NTFS is Window. chmod is Linux. You can NOT use Linux permissions on a Windows file system. You set permissions for Windows systems with the -mount- command. chmod and chown have no meaning on NTFS. – Rinzwind Jun 30 '16 at 18:54
  • http://askubuntu.com/questions/11840/how-do-i-use-chmod-on-an-ntfs-or-fat32-partition – Rinzwind Jun 30 '16 at 18:56

0 Answers0