chmod doesn't work

Chat about Linux in general
Post Reply
AlexL1972
Level 1
Level 1
Posts: 3
Joined: Fri Jul 27, 2018 6:38 pm

chmod doesn't work

Post by AlexL1972 » Fri Jul 27, 2018 6:46 pm

Hi Pals,
I tried to change permission on a number of files and folders with chmod. the command returned no error but the mode was not changed. Does anyone know why?

pls VideoA # ls -ld Movies/
drwx------ 1 alex alex 16777216 Jul 27 11:15 Movies/
pls VideoA # chmod -v 755 Movies/
mode of 'Movies/' changed from 0700 (rwx------) to 0755 (rwxr-xr-x)
pls VideoA # ls -ld Movies/
drwx------ 1 alex alex 16777216 Jul 27 11:15 Movies/
pls VideoA # id
uid=0(root) gid=0(root) groups=0(root)

AlexL1972
Level 1
Level 1
Posts: 3
Joined: Fri Jul 27, 2018 6:38 pm

Re: chmod doesn't work

Post by AlexL1972 » Fri Jul 27, 2018 7:10 pm

VideoA, VideoB, VideoC are 3 volumes on a USB external disk. when I run fdisk, it shows as follows:

--------------------------------------------------
pls alex # pwd
/media/alex
pls alex # ll
total 49160
drwxr-xr-x+ 5 root root 4096 Jul 27 18:09 ./
drwxr-xr-x 6 root root 4096 Jul 26 19:31 ../
drwx------ 1 alex alex 16777216 Jul 27 18:54 VideoA/
drwx------ 1 alex alex 16777216 Dec 31 1969 VideoB/
drwx------ 1 alex alex 16777216 Dec 31 1969 VideoC/

pls alex # fdisk -l /dev/sdb
Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xcbce2081

Device Boot Start End Sectors Size Id Type
/dev/sdb1 256 651174143 651173888 310.5G f W95 Ext'd (LBA)
/dev/sdb2 651174144 1302348031 651173888 310.5G 7 HPFS/NTFS/exFAT
/dev/sdb3 1302348032 1953522943 651174912 310.5G 7 HPFS/NTFS/exFAT
/dev/sdb5 288 651174143 651173856 310.5G 7 HPFS/NTFS/exFAT

Partition table entries are not in disk order.
--------------------------------------------------


Another strange thing: /dev/sdb1 and /dev/sdb5 overlap. Any idea why is that? did I do something wrong?

rui no onna
Level 4
Level 4
Posts: 241
Joined: Thu Jul 19, 2018 4:18 pm

Re: chmod doesn't work

Post by rui no onna » Fri Jul 27, 2018 7:35 pm

sdb1 is an extended partition, sdb5 is just a logical partition inside of sdb1. I guess it was formatted that way to get around the limitation of MBR which only allows 4 primary partitions.

I remember reading somewhere that for FAT32 and NTFS, permissions are handled differently and must be set during mount.

AlexL1972
Level 1
Level 1
Posts: 3
Joined: Fri Jul 27, 2018 6:38 pm

Re: chmod doesn't work

Post by AlexL1972 » Fri Jul 27, 2018 10:41 pm

@rui no onna: thanks. that make much sense.

Post Reply

Return to “Chat about Linux”