Folders are locked, can access to them but can't delete permanently

Well, I'm running Manjaro XFCE and I've two HDD on my pc.

The second one, where I've saved my files, after installing the OS it seems like that the files from this disk has been locked! However, I can access to the files, and even play the videos; but, can't delete them.

What should I do now to solve this problem?

Btw I'm new in Manjaro. To be honest, I'm just a noob here.

Your issue relates to permissions.

You will need to change owner by doing

sudo chown youruser -R /path/to/files

@asifMojtoba

EDIT October 12, 2018 8:16 AM
The next command gives you and everyone else full access to the complete path - everyone includes IRS, NSA, FBI, KGB, GRU and a couple of other services I don't know. I should mention that China and North Korea are very active ATM

chmod 0777 -R /path/to/files

@asifMojtoba
What filesystem in use on the disk?

sudo fdisk -l /dev/sdX

Replace X with the the relevant letter eg. a for the first disk - b for the second

If your disk is used for dualboot - and you have not shutdown Windows properly or fastboot is enabled then you cannot modify files on an ntfs filesystem

@asifMojtoba

sudo fdisk -l /dev/sda

@asifMojtoba
If a disk whether internal nor external is not mounted via fstab the disk is mounted on /run/media/user/disknameorid.

@asifMojtoba
What is the output of

sudo fdisk -l /dev/sda

@asifMojtoba
Try mounting the device on a folder in your home.

mkdir -p ~/hd-movies
mkdir -p ~/hd-series

sudo mount /dev/sda1 ~/hd-series
sudo mount /dev/sda2 ~/hd-movies

This also answers what filesystem is used - NTFS.

Unmount with

sudo umount /dev/sda1
sudo umount /dev/sda2

Then try mounting again - but I fear the same result.

@asifMojtoba

https://wiki.archlinux.org/index.php/NTFS-3G#Troubleshooting

Troubleshooting

Damaged NTFS filesystems
If an NTFS filesystem has errors on it, NTFS-3G will mount it as read-only. To fix an NTFS filesystem, load Windows and run its disk checking program, chkdsk. Take in account that ntfsfix can only repair some errors. If it fails, chkdsk will probably succeed.

Since you probably dualboot - reboot into Windows and use windows tools to fix errors, disable fastboot and shutdown clean.

@asifMojtoba
If you cannot boot into Windows you can copy the files from sda1 to your other drive. Then use a partitioning tool to delete the partition and recreate it, format it and copy your files back.

3 Likes

Try Right clicking on your file manager and select "Thunar Root", then try to delete the file again...

1 Like

Not working. The Delete, Cut and Rename options are still blured. Can't choose any of those.

Try using chmod then

sudo chmod 777 -R /path/to/folder

Woops! Got ninja'ed by @linux-aarhus again!

2 Likes

Hi, sorry to bother you agin but it's still not working. After running your provided command the output I got is, "chmod: changing permisson of my files : Read-only file system.

I even restarted my pc, just to be sure if it worked or not.

Sadly, the lock icon on the folders is still there and I can't delete or rename the files like before. The situation is same. Nothing changed.

Am I doing something wrong?

What filesystem in use on the disk?

sudo fdisk -l /dev/sdX

Wait is your drive ntfs or ntfs-3g ?

after running this one "sudo fdisk -l /dev/sdX"
it says, fdisk: cannot open /dev/sdX: No such file or directory.

I'm actually not sure about the filesystem part. I've no idea.

No you need to change the X into your drive. I think its "c"

sudo fdisk -l /dev/sdc

This is what I got after typing that.

sudo fdisk -I /dev/sdc
fdisk: invalid option -- 'I'

Usage:
fdisk [options] change partition table
fdisk [options] -l [] list partition table(s)

Display or manipulate a disk partition table.

Options:
-b, --sector-size physical and logical sector size
-B, --protect-boot don't erase bootbits when creating a new label
-c, --compatibility[=] mode is 'dos' or 'nondos' (default)
-L, --color[=] colorize output (auto, always or never)
colors are enabled by default
-l, --list display partitions and exit
-o, --output output columns
-t, --type recognize specified partition table type only
-u, --units[=] display units: 'cylinders' or 'sectors' (default)
-s, --getsz display device size in 512-byte sectors [DEPRECATED]
--bytes print SIZE in bytes rather than in human readable format
-w, --wipe wipe signatures (auto, always or never)
-W, --wipe-partitions wipe signatures from new partitions (auto, always or never)

-C, --cylinders specify the number of cylinders
-H, --heads specify the number of heads
-S, --sectors specify the number of sectors per track

-h, --help display this help and exit
-V, --version output version information and exit

Available columns (for -o):
gpt: Device Start End Sectors Size Type Type-UUID Attrs Name UUID
dos: Device Start End Sectors Cylinders Size Type Id Attrs Boot End-C/H/S Start-C/H/S
bsd: Slice Start End Sectors Cylinders Size Type Bsize Cpg Fsize
sgi: Device Start End Sectors Cylinders Size Type Id Attrs
sun: Device Start End Sectors Cylinders Size Type Id Flags

For more details see fdisk(8).

use l not I...

* I was typo back then. Sorry! :persevere:

Probably not directly related, but I had lots of problems when changing permissions via terminal (chown/chmod). Folders and files became inaccessible despite having the correct permissions. Not sure what caused this, but it could be related to extended permissions, ACL or faulty/unnecessary mount options.

well, here's what I got after changing that.

sudo fdisk -l /dev/sdc
fdisk: cannot open /dev/sdc: No such file or directory

You know it's hard to guess the letter based on the screenshoot...
Try with a instead?

sudo fdisk -l /dev/sda

So, what's your suggestion now? Do I need to reinstall the OS? :confused:

Then you don't have a sdc drive.
Look at the output of lsblk to see your devices.

No, as I said, it's not directly related to your issue. Just a warning for some users.

This is what I got

lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 976.6G 0 part /run/media/asif/TV Series
└─sda2 8:2 0 886.5G 0 part /run/media/asif/Movies
sdb 8:16 0 931.5G 0 disk
├─sdb1 8:17 0 923.3G 0 part /
└─sdb2 8:18 0 8.2G 0 part [SWAP]

sda it is, then.

Since they're mounted to /run/media, I guess it's an external drive, isn't it?

Forum kindly sponsored by