3

I'm trying to access my Windows files from Ubuntu, and so far I was able to create a script that mounts the folder I want and have it on the system startup. I am able to list, delete, move, create files, but I'm not able to open them with VLC I get the error:

Your input can't be opened:

VLC is unable to open the MRL 'file:///home/tiago/Windows/Videos/Filmes/x-subterranea-720p.mkv'. Check the log for details.

Can someone help me identify what I'm doing wrong?

This is my Bash script:

!/bin/bash
sudo -S -k mount -t ntfs-3g -o rw /dev/sda3 /root/win
sudo -S -k mount --bind /root/win/Users/Tiago/ /home/tiago/Windows

One of the files I can't open:

root@tiago-X510UR:/home/tiago/Windows/Videos/Filmes# ls -l  ex-subterranea-720p.mkv
-rwxrwxrwx 2 root root 4693513161 set 23  2017 ex-subterranea-720p.mkv

1 Answers1

1

I will copy and paste from my previous AskUbuntu answer but skip some details, ...

  • Unmount the NTFS partition ...

  • Create a custom mountpoint ...

  • Check your userID's uid number ...

Mount the NTFS partition

Example 1 (without execute permissions for files, no access for 'others'),

sudo mount -o rw,user,uid=1000,dmask=007,fmask=117 /dev/sdxn /mnt/sd1  # general syntax
sudo mount -o rw,user,uid=1000,dmask=007,fmask=117 /dev/sdb1 /mnt/sd1  # modify to match your case

This way I think the files and directories in the Windows partition (which I assume has an NTFS file system) should be readable (and writable) by the main user ID, with the number 1000 (and I guess the name 'tiago'). Modify if there is another user ID.

dmask is the mask for directories and fmask is the mask for files. These should be the octal inverse of the permissions that you want (770 and 660).

Check also that you point to the correct device (modify /dev/sdb1 if necessary).

See man mount if you want more details about the mount options.


When this works (maybe after some modifications), you can put the commands into a file (make a bash shellscript), make it executable and run the shellscript in order to mount the Windows partition in a convenient way.

sudodus
  • 47,684