Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I've been using linux as my OS for a year now. But today I am no closer to understanding file permissions and ownership than I was 18 months ago when I downloaded my first linux flavor to try it out. The reason: chown; sometimes it works, and sometimes it doesn't. Here's the latest example where it doesn't. Chown declares that it has changed the ownership of every single file and folder, immediately after ls declares that it hasn't. And ls isn't kidding, because vim still refuses to write a file to one of these folders. Yet mplayer/mencoder don't care about permissions and ownership, they'll write files into these folders without a murmur.
Why? Why has chown failed in this case, yet other times, under identical circumstances, it works?
Code:
root@a:~# chown -vR g:users /media/500gb/Films
changed ownership of `/media/500gb/Films/A Man Escaped (1956) (French with English Subtitles)/VIDEO_TS/VIDEO_TS.BUP' to g:users
changed ownership of `/media/500gb/Films/A Man Escaped (1956) (French with English Subtitles)/VIDEO_TS/VIDEO_TS.IFO' to g:users
changed ownership of `/media/500gb/Films/A Man Escaped (1956) (French with English Subtitles)/VIDEO_TS/VIDEO_TS.VOB' to g:users
changed ownership of `/media/500gb/Films/A Man Escaped (1956) (French with English Subtitles)/VIDEO_TS/VTS_01_0.BUP' to g:users
changed ownership of `/media/500gb/Films/A Man Escaped (1956) (French with English Subtitles)/VIDEO_TS/VTS_01_0.IFO' to g:users
changed ownership of `/media/500gb/Films/A Man Escaped (1956) (French with English Subtitles)/VIDEO_TS/VTS_01_0.VOB' to g:users
changed ownership of `/media/500gb/Films/A Man Escaped (1956) (French with English Subtitles)/VIDEO_TS/VTS_01_1.VOB' to g:users
changed ownership of `/media/500gb/Films/A Man Escaped (1956) (French with English Subtitles)/VIDEO_TS/VTS_01_2.VOB' to g:users
changed ownership of `/media/500gb/Films/A Man Escaped (1956) (French with English Subtitles)/VIDEO_TS/VTS_01_3.VOB' to g:users
changed ownership of `/media/500gb/Films/A Man Escaped (1956) (French with English Subtitles)/VIDEO_TS/VTS_01_4.VOB' to g:users
changed ownership of `/media/500gb/Films/A Man Escaped (1956) (French with English Subtitles)/VIDEO_TS/VTS_01_5.VOB' to g:users
changed ownership of `/media/500gb/Films/A Man Escaped (1956) (French with English Subtitles)/VIDEO_TS' to g:users
changed ownership of `/media/500gb/Films/A Man Escaped (1956) (French with English Subtitles)' to g:users
changed ownership of `/media/500gb/Films/Blood Simple (1984)/BLOOD_SIMPLE.iso' to g:users
...
changed ownership of `/media/500gb/Films/TheRockyHorrorPictureShow/VIDEO_TS/VTS_07_4.VOB' to g:users
changed ownership of `/media/500gb/Films/TheRockyHorrorPictureShow/VIDEO_TS/VTS_07_5.VOB' to g:users
changed ownership of `/media/500gb/Films/TheRockyHorrorPictureShow/VIDEO_TS/VTS_07_6.VOB' to g:users
changed ownership of `/media/500gb/Films/TheRockyHorrorPictureShow/VIDEO_TS/VTS_07_7.VOB' to g:users
changed ownership of `/media/500gb/Films/TheRockyHorrorPictureShow/VIDEO_TS/VTS_08_0.BUP' to g:users
changed ownership of `/media/500gb/Films/TheRockyHorrorPictureShow/VIDEO_TS/VTS_08_0.IFO' to g:users
changed ownership of `/media/500gb/Films/TheRockyHorrorPictureShow/VIDEO_TS/VTS_08_0.VOB' to g:users
changed ownership of `/media/500gb/Films/TheRockyHorrorPictureShow/VIDEO_TS/VTS_08_1.VOB' to g:users
changed ownership of `/media/500gb/Films/TheRockyHorrorPictureShow/VIDEO_TS' to g:users
changed ownership of `/media/500gb/Films/TheRockyHorrorPictureShow' to g:users
changed ownership of `/media/500gb/Films/Watership Down (1978)/VIDEO_TS/VIDEO_TS.BUP' to g:users
changed ownership of `/media/500gb/Films/Watership Down (1978)/VIDEO_TS/VIDEO_TS.IFO' to g:users
changed ownership of `/media/500gb/Films/Watership Down (1978)/VIDEO_TS/VIDEO_TS.VOB' to g:users
changed ownership of `/media/500gb/Films/Watership Down (1978)/VIDEO_TS/VTS_01_0.BUP' to g:users
changed ownership of `/media/500gb/Films/Watership Down (1978)/VIDEO_TS/VTS_01_0.IFO' to g:users
changed ownership of `/media/500gb/Films/Watership Down (1978)/VIDEO_TS/VTS_01_0.VOB' to g:users
changed ownership of `/media/500gb/Films/Watership Down (1978)/VIDEO_TS/VTS_01_1.VOB' to g:users
changed ownership of `/media/500gb/Films/Watership Down (1978)/VIDEO_TS/VTS_01_2.VOB' to g:users
changed ownership of `/media/500gb/Films/Watership Down (1978)/VIDEO_TS/VTS_01_3.VOB' to g:users
changed ownership of `/media/500gb/Films/Watership Down (1978)/VIDEO_TS/VTS_01_4.VOB' to g:users
changed ownership of `/media/500gb/Films/Watership Down (1978)/VIDEO_TS/VTS_01_5.VOB' to g:users
changed ownership of `/media/500gb/Films/Watership Down (1978)/VIDEO_TS/VTS_01_6.VOB' to g:users
changed ownership of `/media/500gb/Films/Watership Down (1978)/VIDEO_TS' to g:users
changed ownership of `/media/500gb/Films/Watership Down (1978)' to g:users
changed ownership of `/media/500gb/Films/Who_s Afraid of Virginia Woolf (1966)/Virginia Woolf.iso' to g:users
changed ownership of `/media/500gb/Films/Who_s Afraid of Virginia Woolf (1966)' to g:users
changed ownership of `/media/500gb/Films' to g:users
root@a:~# ls -l /media/500gb/Films
total 8280072
drwxrwxrwx 1 root root 0 Dec 29 16:54 A\ Man\ Escaped\ (1956)\ (French\ with\ English\ Subtitles)/
drwxrwxrwx 1 root root 0 Dec 24 06:49 Blood\ Simple\ \ (1984)/
drwxrwxrwx 1 root root 4096 Dec 29 12:35 Butch\ Cassidy\ and\ the\ Sundance\ Kid\ (1969)/
drwxrwxrwx 1 root root 24576 Dec 28 16:43 Dorm2006/
-rwxrwxrwx 1 root root 7011001155 Nov 4 2009 Heathers\ 1989\ 720p\ BluRay\ DTS\ x264-EbP.mkv*
drwxrwxrwx 1 root root 4096 Dec 18 12:07 Performance/
drwxrwxrwx 1 root root 0 Dec 31 13:54 Pickpocket\ (1959)\ (French\ with\ English\ Subtitles)/
drwxrwxrwx 1 root root 0 Dec 31 04:45 Psycho\ (1960)/
drwxrwxrwx 1 root root 0 Dec 22 14:28 Sophie_s\ Choice\ (1982)/
drwxrwxrwx 1 root root 0 Dec 30 04:48 The\ Damned\ (La\ Caduta\ degli\ dei)\ (1969)/
drwxrwxrwx 1 root root 4096 Dec 18 11:52 The\ Harder\ They\ Come\ (1972)/
drwxrwxrwx 1 root root 4096 Dec 18 11:53 The\ Misfits\ (1961)/
drwxrwxrwx 1 root root 0 Dec 29 06:17 The\ Mist\ (2007)/
drwxrwxrwx 1 root root 0 Dec 26 09:04 The\ Reader\ (2008)/
drwxrwxrwx 1 root root 4096 Dec 18 11:54 The\ Tragedy\ of\ Macbeth\ (1971)\ DVD9/
-rwxrwxrwx 1 root root 1461784042 Dec 14 10:07 TheGodsMustBeCrazy1980.avi*
drwxrwxrwx 1 root root 0 Dec 13 13:56 TheRockyHorrorPictureShow/
drwxrwxrwx 1 root root 0 Dec 28 05:37 Watership\ Down\ (1978)/
drwxrwxrwx 1 root root 0 Dec 23 05:22 Who_s\ Afraid\ of\ Virginia\ Woolf\ (1966)/
-rwxrwxrwx 1 root root 83191 Dec 29 11:55 movie.idx*
-rwxrwxrwx 1 root root 5873664 Dec 29 11:55 movie.sub*
root@a:~#
Click here to see the post LQ members have rated as the most helpful post in this thread.
I've read the man pages to these 3 instructions many times. If you check the output of ls -l that I included in my first post you'll see that I am not interested in chmod here, as the permissions are already set the way I need them. And I'm not interested in chgrp, as I need to change the owner as well as the group. My usage of chown is correct for what I want to do here, and you can see, from its partial output that I included in my first post, that it claims to have made the appropriate changes to every file and sub-folder. But manifestly, it did not.
I hate this damned chown with a passion. Every time I go to use it, its a crap shoot whether it works or not. And there is nothing anywhere that I can find from anyone else reporting similar behaviour. So it has to be something about the setup of my system, which is quite unremarkable, stock slackware 13.37 + about 6-7 other apps.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
I apologise for not reading your post and, thus, asking you to repeat yourself.
Which filesystem are you using? I have no doubt I will not be able to help you but I am curious.
I apologise for not reading your post and, thus, asking you to repeat yourself.
Which filesystem are you using? I have no doubt I will not be able to help you but I am curious.
I hate this damned chown with a passion. Every time I go to use it, its a crap shoot whether it works or not. And there is nothing anywhere that I can find from anyone else reporting similar behaviour. So it has to be something about the setup of my system, which is quite unremarkable, stock slackware 13.37 + about 6-7 other apps.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
Quote:
Originally Posted by porphyry5
See above, twice.
I am very slow tonight and apologies. It seems I made the same error you did -- assuming that you were using a file system which was compatible with the commands you were using. snowpine has the answer.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.