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
8
  • What do you mean by 'open'? I would say that when you can view a file, you can open it (with the viewer). Are there problems only with multimedia files? In that case maybe you need to install the package ubuntu-restricted-extras.
    – sudodus
    Oct 15, 2018 at 17:51
  • VLC can't load the file. I get an error. If I copy the file to the local system folder I can open it with no problems Oct 15, 2018 at 18:00
  • There might be a problem with ownership (of /root/win or /home/tiago/Windows or some subdirectory), so that VLC is not allowed to see the file. Please notice, that you should not run VLC with elevated permissions, so the file should be visible by the regular user ID (I guess it is 'tiago').
    – sudodus
    Oct 15, 2018 at 18:29
  • Maybe the following link can help you mount the Windows partition with suitable options, Mount NTFS partition in a USB drive with custom permissions and owner
    – sudodus
    Oct 15, 2018 at 18:33
  • i thought that by giving rwx to others would allow anyone to be able to open the file. vlc included Oct 15, 2018 at 19:42

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .