Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi, this is probably a super easy question but it would really help me out.
I have an external USB drive that is in NTFS (its a backup of everything I saved when I used winblows)
Well to make a long story short, I have had signifcant trouble getting the drive to mount and let me browse/open files on it without going into a file browser as root.
Anyway, it woudl really save me time to be able to change the permissions on an entire directory (including the contents) but it seems each time i try this, it only changes the permissions for the directory itself and doens't include the contents. What am I doing wrong?
Assuming you are using the chmod command to change permissions, add the -R option (recursive) to change permissions on directories and files recursively. See the chmod man page for more info.
Be aware that you can't change the permissions on the NTFS filesystem. If you want to allow users to read/write to that then you need to use the umask option when mounting.
Read throught the "man mount" man pages. Different filesystem types have different mount options. For NTFS, you can use the "umask" option in the mount command to allow "others" to read files. Alternatively, you could use both the "fmask" and "dmask" options to give files and disks different permissions. This allows you to have the "x" permission bit set for directories and cleared for files.
If you are the only user of the drive, then you could use the "uid" option. This options could let you become the "owner" of the mounted partition. You can use either your UID number or your username, as in "uid=julianpdx" if that where your user name on the computer as well.
Kernel write support is limited. With, it you can only modify existing files. I wouldn't recommend using it.
Kernel write support is limited. With, it you can only modify existing files.
That's old stuff now, since I think 2.6.15 the kernel has pretty good NTFS support. The userspace driver is better (albeit way slower) but the kernel driver can still create files and do enough so Joe Average can use their NTFS partition successfully. Encrypted directories etc aren't support yet but it's stuff like that it can't do.
well hrm..i was comfortable just copying directories from the drive to a location on my regular user account
..i know that i then need to change permission on the directory to see it
grrr..thats not working. I want one command that can take a directory and change it so that a non-root user can read, write and execute anything within that directory.
As for the spaces:
either escape them with a backslash, or put the whole thing in double quotes.
cp -r /this\ is\ a\ stupid\ name /home/user/good_name
or
cp -r "this is a stupid name" /home/user/good_name
That's old stuff now, since I think 2.6.15 the kernel has pretty good NTFS support.
The support on my kernel (2.6.16) is limited. Look for the ntfs.txt file in the kernel documentation before using write support for ntfs.
Quote from ntfs.txt
Quote:
- This is a complete rewrite of the NTFS driver that used to be in the 2.4 and
earlier kernels. This new driver implements NTFS read support and is
functionally equivalent to the old ntfs driver and it also implements limited
write support. The biggest limitation at present is that files/directories
cannot be created or deleted. See below for the list of write features that
As for the spaces:
either escape them with a backslash, or put the whole thing in double quotes.
Cheers,
Tink
I've discovered that the newer bash (3) handles weird file names quite well with tab completion. Type whateve you can of the filename , hit tab and it expands with spaces and unusual characters escaped.
Don't remember if ver. 2 did this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.