Permission issue regarding USB flashdrive with Ventoy

Hello! :nerd_face:

λ inxi -Fza
System:
Kernel: 5.16.8-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=b24f311b-7627-4dc9-9b5a-182829379e69 rw rootflags=subvol=@
quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3
Desktop: KDE Plasma 5.24.0 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11
vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop Mobo: Gigabyte model: B365M H v: x.x
serial: <superuser required> UEFI: American Megatrends v: F3
date: 09/05/2019
CPU:
Info: model: Intel Core i5-9400F bits: 64 type: MCP arch: Coffee Lake
family: 6 model-id: 0x9E (158) stepping: 0xA (10) microcode: 0xEC
Topology: cpus: 1x cores: 6 smt: <unsupported> cache: L1: 384 KiB
desc: d-6x32 KiB; i-6x32 KiB L2: 1.5 MiB desc: 6x256 KiB L3: 9 MiB
desc: 1x9 MiB
Speed (MHz): avg: 2798 high: 3625 min/max: 800/4100 scaling:
driver: intel_pstate governor: powersave cores: 1: 3548 2: 2000 3: 3266
4: 2188 5: 2163 6: 3625 bogomips: 34798
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities:
Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf
mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled
Type: mds mitigation: Clear CPU buffers; SMT disabled
Type: meltdown mitigation: PTI
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional,
IBRS_FW, STIBP: disabled, RSB filling
Type: srbds mitigation: Microcode
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: NVIDIA TU117 [GeForce GTX 1650] vendor: Gigabyte driver: nvidia
v: 510.47.03 alternate: nouveau,nvidia_drm bus-ID: 01:00.0
chip-ID: 10de:1f82 class-ID: 0300
Device-2: GEMBIRD USB2.0 PC CAMERA type: USB
driver: snd-usb-audio,uvcvideo bus-ID: 1-1:2 chip-ID: 1908:2310
class-ID: 0102
Display: x11 server: X.Org 1.21.1.3 compositor: kwin_x11 driver:
loaded: nvidia unloaded: modesetting alternate: fbdev,nouveau,nv,vesa
display-ID: :0 screens: 1
Screen-1: 0 s-res: 1680x1050 s-dpi: 90 s-size: 474x303mm (18.7x11.9")
s-diag: 563mm (22.1")
Monitor-1: DP-0 res: 1680x1050 hz: 60 dpi: 90
size: 474x296mm (18.7x11.7") diag: 559mm (22")
OpenGL: renderer: NVIDIA GeForce GTX 1650/PCIe/SSE2
v: 4.6.0 NVIDIA 510.47.03 direct render: Yes
Audio:
Device-1: Intel 200 Series PCH HD Audio vendor: Gigabyte
driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:a2f0
class-ID: 0403
Device-2: NVIDIA vendor: Gigabyte driver: snd_hda_intel v: kernel
bus-ID: 01:00.1 chip-ID: 10de:10fa class-ID: 0403
Device-3: GEMBIRD USB2.0 PC CAMERA type: USB
driver: snd-usb-audio,uvcvideo bus-ID: 1-1:2 chip-ID: 1908:2310
class-ID: 0102
Sound Server-1: ALSA v: k5.16.8-zen1-1-zen running: yes
Sound Server-2: PulseAudio v: 15.0 running: no
Sound Server-3: PipeWire v: 0.3.45 running: yes
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: Gigabyte driver: r8169 v: kernel port: d000 bus-ID: 07:00.0
chip-ID: 10ec:8168 class-ID: 0200
IF: enp7s0 state: up speed: 100 Mbps duplex: full mac: <filter>
Bluetooth:
Device-1: Integrated System Solution Bluetooth Device type: USB
driver: btusb v: 0.8 bus-ID: 1-9:7 chip-ID: 1131:1004 class-ID: fe01
Report: bt-adapter ID: hci0 rfk-id: 2 state: up address: <filter>
Drives:
Local Storage: total: 1.64 TiB used: 710.81 GiB (42.3%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Kingston model: SA400S37240G
size: 223.57 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
type: SSD serial: <filter> rev: B1D2 scheme: GPT
ID-2: /dev/sdb maj-min: 8:16 vendor: Western Digital
model: WD5000AZRX-00A8LB0 size: 465.76 GiB block-size: physical: 4096 B
logical: 512 B speed: 6.0 Gb/s type: N/A serial: <filter> rev: 1A01
scheme: MBR
ID-3: /dev/sdc maj-min: 8:32 vendor: Western Digital
model: WD10EZEX-60WN4A1 size: 931.51 GiB block-size: physical: 4096 B
logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter>
rev: 1A03 scheme: GPT
ID-4: /dev/sdd maj-min: 8:48 type: USB model: Specific STORAGE DEVICE
size: 58.59 GiB block-size: physical: 512 B logical: 512 B type: N/A
serial: <filter> rev: 0009 scheme: MBR
SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
ID-1: / raw-size: 68.36 GiB size: 68.36 GiB (100.00%)
used: 21.24 GiB (31.1%) fs: btrfs dev: /dev/sda5 maj-min: 8:5
ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%)
used: 25.6 MiB (26.6%) fs: vfat dev: /dev/sda2 maj-min: 8:2
ID-3: /home raw-size: 68.36 GiB size: 68.36 GiB (100.00%)
used: 21.24 GiB (31.1%) fs: btrfs dev: /dev/sda5 maj-min: 8:5
ID-4: /var/log raw-size: 68.36 GiB size: 68.36 GiB (100.00%)
used: 21.24 GiB (31.1%) fs: btrfs dev: /dev/sda5 maj-min: 8:5
ID-5: /var/tmp raw-size: 68.36 GiB size: 68.36 GiB (100.00%)
used: 21.24 GiB (31.1%) fs: btrfs dev: /dev/sda5 maj-min: 8:5
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 15.57 GiB used: 0 KiB (0.0%) priority: 100
dev: /dev/zram0
Sensors:
System Temperatures: cpu: 27.8 C mobo: 16.8 C gpu: nvidia temp: 44 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Info:
Processes: 313 Uptime: 3h 14m wakeups: 0 Memory: 15.57 GiB
used: 5.64 GiB (36.2%) Init: systemd v: 250 tool: systemctl Compilers:
gcc: 11.1.0 Packages: pacman: 1369 lib: 342 Shell: fish v: 3.3.1
default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.12
λ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 223,6G  0 disk 
├─sda1   8:1    0   529M  0 part 
├─sda2   8:2    0   100M  0 part /boot/efi
├─sda3   8:3    0    16M  0 part 
├─sda4   8:4    0 154,6G  0 part /run/media/catalin/8A5602B95602A5D3
└─sda5   8:5    0  68,4G  0 part /var/tmp
/var/log
/var/cache
/srv
/root
/home
/
sdb      8:16   0 465,8G  0 disk 
├─sdb1   8:17   0   100M  0 part 
├─sdb2   8:18   0 172,7G  0 part /mnt/4C42178042176DC8
├─sdb3   8:19   0 146,5G  0 part /mnt/9440CC3240CC1CBC
└─sdb4   8:20   0 146,5G  0 part /mnt/62D2D04CD2D025D7
sdc      8:32   0 931,5G  0 disk 
├─sdc1   8:33   0   512M  0 part 
├─sdc2   8:34   0 462,3G  0 part /mnt/80DE4F00DE4EEDCA
└─sdc3   8:35   0 468,8G  0 part /mnt/6EE25599E255667D
sdd      8:48   1  58,6G  0 disk 
├─sdd1   8:49   1  58,6G  0 part /mnt/usb-Specific_STORAGE_DEVICE_19090601010022-0:0-part1
└─sdd2   8:50   1    32M  0 part /mnt/usb-Specific_STORAGE_DEVICE_19090601010022-0:0-part2
zram0  254:0    0  15,6G  0 disk [SWAP] 

My issue: I don't have permission to write/delete on my USB flashdrive.

As you probably already know, I have a laptop which needs a Linux OS on it and since it's a problematic computer (in terms of hardware), I thought to give it a try with some distros that are systemd-free (according to someone).

On this PC I have dual-boot with Windows10 but slowly and surely I want to quit it forever. So I tried all day learning and searching the forums on how I can put / copy-paste some ISOs on my Hama 3.0 USB flashdrive (which is exfat with Ventoy). Eventually I managed to copy them from Downloads to /mnt/usb-Specific_STORAGE_DEVICE_19090601010022-0:0-part1/ (which is /dev/sdd1) with the command sudo cp /path/to/file /path/to/destination.
I also tried changing the permission by right clicking or going for 1. su 2. Chown -v username foldername but then I learned this is not a normal file or directory, but a.. separate drive.
I still cannot delete them, copy paste with mouse or drag&drop. I am the only user and administrator.
[Screenshot-7 — ImgBB](Link 1)
[Screenshot-5 — ImgBB](Link 2)

Regarding the mounting.. since I`m newbie.. I installed gnome-disk-utility to have them auto-mounted at startup (and then I learned it's not really okay like this as they have to be mounted somewhere else and not in /mnt/ which is a temporary directory, right?)

Then I learned my problem is correlated with fstab and uid, gid, and umask. But I don't know exactly what I have to do in my case. I understood that it would be better to have all my drives and partitions mounted somewhere else, like in /root/.

I searched and read on many Arch Linux posts but they tend to get so specific and technical.. Unfortunately, I could not find a graphical way of resolving this one.
What do you think I should do?

Why do you want to mount a Ventoy USB stick?
Mounting, copying etc. should work OOTB.
Open dolphin and copy paste the ISO.

1 Like

It tells me Access denied, I don’t know why… seems like sudo cp won’t work in adding an ISO from another NTFS drive to the flashdrive neither.

I thought the same… I don’t know why it’s like this. :face_with_diagonal_mouth:

Install ventoy again, nothing more!!!
Path in dolphin than is

/run/media/sgs/Ventoy/

Do not mount it somewhere,.

I reinstalled ventoy using the linux version, so the flashdrive has also been formated. It’s still exfat.

Not sure about this, I used the ventoyGUIx86_64 to reinstall as it was also written in readme but it’s still happening - access denied.

ventoy-bin

image

Use this one

sdb
├─sdb1      exfat  1.0   Ventoy      7757-4FDD                              16,4G    36% /run/media/sgs/Ventoy
├─sdb2      vfat   FAT16 VTOYEFI     498E-5512

Is correct.

Moment, you want to remove Ventoy?

Maybe to much text for me. Use gparted then.

No, of course not. I ran it from the exe downloaded but the website. But I also tried it by installing it like you showed me in the picture.

I also formated again to exfat from gparted and then also checked its integrity,
Gparted would not allow me to do anything else to that partition on the stick. Of course I can unmount it and perhaps change its flags… at the moment it has only boot. Here, I added some pictures.
Transferring ISO Access Denied
The stick information

I made it from Exfat to NTFS - so Exfat does not work with Linux at all? not even on a flashdrive?

Wow, those auto-generated mount points are dizzying! :woozy_face:

That is not quite accurate. I mount stuff permanently in /mnt all the time, you just make your own directory (named whatever you like) inside of /mnt. The command to make a new directory is mkdir, so if you want to make a directory for, let’s say, your blue flash drive you can do:

sudo mkdir /mnt/blueflashdrive

You have to run the command elevated (sudo) because all directories “above” /home in the directory tree are system files owned by root. To change ownership of your new folder to yourself, run chown (short for “change ownership”, I’m guessing). The syntax is chown [OPTIONS] USER[:GROUP] FILE(s):

sudo chown -R catalin:catalin /mnt/blueflashdrive

-R is recursive, so the permission trickles down to anything you put inside. catalin I put for the username and group name, obviously yours might be different on your computer but you probably do have a group named after yourself like this by default.

Finally you mount the drive. Let’s say for this example the blue flash drive is sdb1:

sudo mount /dev/sdb1 /mnt/blueflashdrive

I know this seems like a lot at first, but once you get the hang of it it will be worth it. Your lsblk output is frankly a mess–I would find it very difficult to keep it straight.

This might be the crux of the issue right here. NTFS is compatible with Linux, but requires some extra finagling to work correctly. One example is for some reason when you mount an NTFS drive it defaults to being very locked down permission-wise. This can even be true if you made your own directory and changed ownership to yourself, like in the example above.

I personally don’t have that much experience mounting NTFS drives in Linux, but here is what a quick search turned up:

When you mount NTFS, you can set the file permissions - not at file level.
sudo mount -t ntfs -o rw,auto,user,fmask=0133,dmask=0000 /dev/whatever /mnt/whatever
If you put a correct line in /etc/fstab, you can do GUI totally.
dmask is for directory mask (777 - mask), fmask is for file mask (now 0777-0133 = 0644).
Meaning of numbers are:

0(special NTFS does not use IMO)
6(Owner rihts)
4(group right)
4(anybody else rights).
Meaning of digits: (you have to add these together to have multiple rights)

4 - read right
2 - write right
1 - execute right
Directories has to be executalble to able to enter it.

So our example from above would turn into this:

sudo mount -t ntfs -o rw,auto,user,fmask=0133,dmask=0000 /dev/sdb1 /mnt/blueflashdrive

The explanation above continues here.

My guess is the gnome-disk-utility, in addition to making incomprehensible mount point names, is not doing all this extra stuff with the special permission masks. I don’t know the story with that, but I do see gnome disk utility is a wrapper for udisks, which is supposed to be able to properly mount NTFS if you have ntfs-3g installed. Do you?

sudo pacman -S ntfs-3g

2 Likes

This is all very nice, but has nothing to do with Ventoy.
Ventoy creates a bootable USB stick with 2 partitions.
The ISO are copied into the second partition.
Done.
Nothing has to be mounted. Maybe change the USB port (also with dd).
If the stick does not work with Ventoy, you should traditionally burn the ISO with dd.
Everything that has been presented to you so nicely here is already on the internet and we want to avoid making a copy of all the solutions again in our forum.
Means that we give here help to the self-help with

https://wiki.archlinux.org/title/Dd

I am sure there are also examples here in the forum.
Like

Edit:

sudo ventoy -u /dev/sdd

**********************************************
      Ventoy: 1.0.66  x86_64
      longpanda [email protected]
      https://www.ventoy.net
**********************************************

Upgrade operation is safe, all the data in the 1st partition (iso files and other) will be unchanged!

Update Ventoy  1.0.65 ===> 1.0.66   Continue? (y/n)y
esp partition processing ...
Open ventoy efi file 0x610ac0
ventoy x64 efi file size 1765376 ...
Open bootx64 efi file 0x610ac0
Open ventoy ia32 efi file 0x610f10
ventoy efi file size 1187840 ...
Open bootia32 efi file 0x610ac0

Update Ventoy on /dev/sdd successfully finished.
1 Like

I agree, it does not appear the problem is with Ventoy. The iso that they are trying to put on the Ventoy device appears to be “stuck” on an NTFS partition:

It is true there may be other options for creating a boot disk (just re-download the iso to Linux media and transfer to Ventoy from there, for example) but if the problem they want to solve is the permission issue with accessing data from the NTFS drive, then using dd is not enough.

1 Like

But ventoy do nut use NTFS, but maybe my translation app failed.

sdd                                                                                   
├─sdd1      exfat  1.0   Ventoy   7757-4FDD                              21,1G    18% /run/media/sgs/Ventoy
├─sdd2      vfat   FAT16 VTOYEFI  6BF7-DE0F                                           
└─sdd3      btrfs        data     239a0f55-30fd-4c52-8472-553a04dea527 

sdd3 is my personal data part :slight_smile:

1 Like

Yes, the Ventoy should definitely not be NTFS. The default is as you have it, with a FAT FS for the EFI partition and exfat for the ISOs. Actually ext4 is supported too, if you want to do that instead of exfat. Not needed, but possible.

The NTFS drives are from something else. I am guessing they had Windows installed and stored a bunch of stuff on there that they want to get out now. So the way I understand it is:

  • The ISO is on an NTFS drive, just sitting there and doing nothing
  • They want to copy the ISO off of the NTFS drive and put it on the exfat Ventoy
  • They cannot copy or remove the data from the NTFS drive (read only access)

I might be mistaken but that was how I was reading the situation.

FAT16, that is interesting (you don’t see that very often). What made you decide to format the EFI with FAT16?

2 Likes

I do nothing, ventoy use and make it :slight_smile:

4 Likes

I understand. I tried though to make an account on ArchForum but they specifically say that it should only be for vanilla… I will see…
Definitely I am going to read more about this on wiki!

Yes I have it.

It works, I was able to mount them in their folders created by me but they won’t stay there as such. Maybe gnome-disk-utilities is doing something on its own about this?

So I am able to copy ISO from the NTFS mechanical hardrive to the SSD Linux partition without issues.

All in one: IT WORKS!

You sir, deserve a beer! xD This is the solution! The problem was the flashdrive itself, it didn’t have permissions :clap: :ok_hand:

Edit

Yes, I know, my computer is a hard disk Frankenstein #lol. I have three hard disks xD

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.