Sponsored Content
Top Forums Shell Programming and Scripting Change file permission of mounted drive Linux Post 302958579 by yifangt on Friday 23rd of October 2015 11:36:45 AM
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!
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
LIBBLKID(3)							Programmer's Manual						       LIBBLKID(3)

NAME
libblkid - block device identification library SYNOPSIS
#include <blkid.h> cc file.c -lblkid DESCRIPTION
The libblkid library is used to identify block devices (disks) as to their content (e.g. filesystem type) as well as extracting additional information such as filesystem labels/volume names, unique identifiers/serial numbers. A common use is to allow use of LABEL= and UUID= tags instead of hard-coding specific block device names into configuration files. The low-level part of the library also allows to extract infomation about partitions and block device topology. The high-level part of the library keeps information about block devices in a cache file /etc/blkid.tab and is verified to still be valid before being returned to the user (if the user has read permission on the raw block device, otherwise not). The cache file also allows unprivileged users (normally anyone other than root, or those not in the "disk" group) to locate devices by label/id. The standard loca- tion of the cache file can be overridden by the environment variable BLKID_FILE. In situations where one is getting information about a single known device, it does not impact performance whether the cache is used or not (unless you are not able to read the block device directly). The high-level part of the library supports two methods to evaluate LABEL/UUID. It reads information directly from a block device or read information from /dev/disk/by-* udev symlinks. The udev is preferred method by default. If you are dealing with multiple devices, use of the cache is highly recommended (even if empty) as devices will be scanned at most one time and the on-disk cache will be updated if possible. In some cases (modular kernels), block devices are not even visible until after they are accessed the first time, so it is critical that there is some way to locate these devices without enumerating only visible devices, so the use of the cache file is required in this situa- tion. CONFIGURATION FILE
The standard location of the /etc/blkid.conf config file can be overridden by the environment variable BLKID_CONF. The following options control the libblkid library: SEND_UEVENT=<yes|not> Sends uevent when /dev/disk/by-{label,uuid}/ symlink does not match with LABEL or UUID on the device. Default is "yes". CACHE_FILE=<path> Overrides the standard location of the cache file. This setting can be overridden by the environment variable BLKID_FILE. Default is /etc/blkid.tab. EVALUATE=<methods> Defines LABEL and UUID evaluation method(s). Currently, the libblkid library supports "udev" and "scan" methods. More than one meth- ods may be specified in a comma separated list. Default is "udev,scan". The "udev" method uses udev /dev/disk/by-* symlinks and the "scan" method scans all block devices from the /proc/partitions file. AUTHOR
libblkid was written by Andreas Dilger for the ext2 filesystem utilties, with input from Ted Ts'o. The library was subsequently heavily modified by Ted Ts'o. The low-level probing code was rewritten by Karel Zak. FILES
/etc/blkid.tab caches data extracted from each recognized block device /etc/blkid.conf configuration file AVAILABILITY
libblkid is part of the util-linux package since version 2.15 and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. COPYING
libblkid is available under the terms of the GNU Library General Public License (LGPL), version 2 (or at your discretion any later ver- sion). SEE ALSO
blkid(8) findfs(8) util-linux May 2009 LIBBLKID(3)
All times are GMT -4. The time now is 10:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy