Change file permission of mounted drive Linux


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Change file permission of mounted drive Linux
# 1  
Old 10-23-2015
Change file permission of mounted drive Linux

I got a problem with the permission of mounted 2TB drive in my Linux/Mint system. All the files in any folder are with 777, which is not what I want.
my fstab line for this disk is:
Code:
UUID=90803E0C803DF974 /media/grape/Workspace1_ntfs ntfs auto,users,permissions 0 0

and blkid gave me:
Code:
$> blkid

/dev/sda1: UUID="f1e68676-42bd-40ae-8888-4e705195834a" TYPE="ext4" 
/dev/sda5: UUID="cb3deb29-1470-4177-a473-423692d22e89" TYPE="swap" 
/dev/sdb1: LABEL="Workspace1_ntfs" UUID="90803E0C803DF974" TYPE="ntfs"

How to change 777 to 755, and any other types of permission I can as root?
Thanks!
# 2  
Old 10-23-2015
I'm not sure what the "permissions" option does. Where you have "auto,users,permissions" I'd put "auto,users,umask=022"
# 3  
Old 10-23-2015
I copied from other post when I first could not run anything from that mounted disk. With permissions 0 0 everything was changed belongs to root with permission 777, which is worse than the previous permission setting (forgot what it was!), and this annoying when I browse the folders. I want to get it back to original setting.
After I changed with your settings, it is the same. I can't even change the permissions under root.
Code:
sudo chmod a-wx *.c
sudo chmod -x *.pdf

did not give any error, though.

Last edited by yifangt; 10-23-2015 at 03:04 PM..
# 4  
Old 10-23-2015
NTFS is the filesystem Microsoft Windows uses, and increasingly these days, now that drives have finally gotten too large for even FAT32 to handle, disks are coming preformatted with it.

In short, an NTFS volume does not have UNIX file permissions, it has something completely different which doesn't translate into UNIX terms. Particularly it does not have a number for owner, a number for group, or 3 groups of rwx file permission bits. You must tell the driver what user, group, and permissions to assume by default with umask=022,uid=number,gid=number in the options group

That doesn't leave a lot for chmod or chown to work with. I think it's possible to set the NTFS "read only" bit by removing r from user, group and world, maybe.
# 5  
Old 10-23-2015
Thanks!
It seems currently I am using this disk as Linux executable.
I'll just leave it as mounted storage space, although it is annoying me.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need a script to create file permission change restriction

Hello, I am looking for a UNIX shell script which can help me for access restriction. 1) /home/ram, there are number file with .txt extension, which should be only owned "ram" user. like as below ls -lrt *.txt -rwx------ 1 ram dba 11 Jan 4 2015 PASS1.txt -rwx------ 1 ram dba 10 Jan 4... (8 Replies)
Discussion started by: mr.trilok
8 Replies

2. Shell Programming and Scripting

Change permission on a file recursively

Hi, this is the structure of the directory /local/home/app/cases under cases directory, below are the sub directories and each directory has files. /local/home/app/cases/1 /local/home/app/cases/2 /local/home/app/cases/3 /local/home/app/cases/4 File types are .txt .sh and so... (5 Replies)
Discussion started by: lookinginfo
5 Replies

3. UNIX for Dummies Questions & Answers

Change unix permission when I don't own the file

Hi, A file is transferred from a Windows server(say username : user1) to Unix server via ftp. In unix, the permission of the file for a user, say user2 will be "-rw-r-----". Since the user1 is the owner of the file, user2 is not able to change the file permission using chmod. Is there... (5 Replies)
Discussion started by: merin
5 Replies

4. Shell Programming and Scripting

Change the file permission

Guys, I need help. I need to change the .txt file permission after I have reset the file content to 0. The code that reset the file content to 0 is as follows: #!/bin/sh for i in /root/script/*.txt do echo "0" > $i done However, the file is generated by the apache application,... (3 Replies)
Discussion started by: jasperux
3 Replies

5. Shell Programming and Scripting

Directory / File changes on CIFS share mounted on Red Hat Linux

I have a requirement to copy the changed file on CIFS share mounted on Red Hat Linux to a remote FTP/SFTP server. I tried inotify-tools, but this didn't track the modified files. Has anyone tried incron or any other suggestion? (1 Reply)
Discussion started by: SupeAlok
1 Replies

6. AIX

Change file permission by anothere user !

Guy's we are in AIX 5.3 We have created two users user1 and user2 and they are under same group Staff Group user1 will create file under /tmp/ and this is the permission of this file -rw-r--r-- 1 user1 staff 1 Jun 13 09:47 file user2 is under same group and when he... (14 Replies)
Discussion started by: ITHelper
14 Replies

7. UNIX for Dummies Questions & Answers

How to change the default permission of a file

I am creating a file using the UTL_FILE command of oracle. This creates a file with the oracle user id. The file does not have permission for being read by any other user id. Is there a way that I can change this default permission. I tried using umask in the .login. Setting the umask to 022 works... (2 Replies)
Discussion started by: reachsamir
2 Replies

8. HP-UX

ksh : permission denied on mounted dir

Hello, I have the following problem. I made a directory /mnt/appserv and mounted it on a windows server. The line in /etc/fstab to do this is the following : winoracle:/environments10g /mnt/appserv cifs defaults 0 0 I have mounted this dir as root-user. The rights on the directory are... (1 Reply)
Discussion started by: bdb78451
1 Replies

9. Shell Programming and Scripting

Test to see if a drive is mounted at a specific point

I have a script that backs up our storage drive daily to one external drive and weekly to another. What I'd like to do is find a way, in the script, to test whether the drives are mounted so that it doesn't accidentally fill up the main drive in the event of a drive failure, etc. Any ideas on how... (1 Reply)
Discussion started by: spectre_240sx
1 Replies

10. UNIX for Advanced & Expert Users

Timestamp of File permission change

Hi!! Experts, Is there any way to find the timestamp when the permission of a file was modified?? I mean no change to file contents.. Just the chnage of permissions. :) (1 Reply)
Discussion started by: jyotipg
1 Replies
Login or Register to Ask a Question