#how to change owner of everything in the directory

87 messages · Page 1 of 1 (latest)

lean robin
#

hello everyone 🙂 noob here
i'm trying to run a game from steam that is installed on a separately mounted ntfs drive

when the game is installed on the main ssd where my arch linux installation and /home dir is it works but when it's on the separate drive it doesn't it just says launching then stops and the button turns back into play from the steam app

i read from a forum thread that it might be because of permissions, and everything on this separate drive is owned by root for some reason, i was thinking maybe changing the ownership of the SteamLibrary dir atleast but when i do

sudo chown pum /media/hdd/SteamLibrary

although no error messages appear nothing changes
it still says it's owned by root

$ ls -ld /media/hdd/SteamLibrary    
drwxrwxrwx 1 root root 4096 Jun 21 15:19 /media/hdd/SteamLibrary

i'm on arch linux kernel: 6.3.8-arch1-1

lilac anchor
#

ah yes

#

if you have the game on an ntfs

#

you gotta simlink the compatdata folder of the steamlibrary in your ntfs drive to an ext4/btrfs/xfs/zfs/bcachefs one

that folder holds the wine prefixes steam makes to run windows games on Proton

wine prefixes can't be made in an ntfs drive

lilac anchor
#

what are the mount options you are using for the ntfs drive?

#

you may not even need to chown the folder, just change mount options

lean robin
#

i don't know about mount options

#

i just knwo its ntfs

lilac anchor
#

you can checck with findmnt /media/hdd

lean robin
#
$ findmnt /media/hdd            
TARGET     SOURCE    FSTYPE  OPTIONS
/media/hdd /dev/sda1 fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096
lilac anchor
#

also did you mount this manually?

lean robin
#

sort of, when i installed arch, i mounted it with just mount /dev/sda1 /media/hdd but then i genfstab -U -p >> /etc/fstab

#

so its genfstab from the bootable media that created these options

lilac anchor
#

ah, try removing the fstab entry

#

then mount it with udisks or your file manager, same thing

lean robin
#

gonna try that might take a hot minute though coz i'm in the process of moving the files in it to an external hdd so i can format it into ext4, trying to attack this from multiple angles iguess

#

ty for the insight though

lilac anchor
#

oh yeah, to chmod entire directories you gotta chown -r
tho why bother if you can fix it with a change in mount option

#

also making sure, you didn't copy the steamlibary with sudo cp right?
copying it with sudo makes the created copy to be owned by root

lean robin
#

welp

#

wdym?

lilac anchor
#

nah, you can do this, you just gotta make sure compatdata symlinks to a folder in ext4/btrfs
and you mount ntfs with the right mount options

#

also no

you also own /run/user/UID
UID being your user's UID
you also own /run/media/$USER

#

...
they have their ntfs drive mounted to /media/hdd

topaz yachtBOT
lilac anchor
#

and mounting to $HOME is not common practice

#

it's usually /mnt or /run/media/$USER
/media/$USER if you're on Ubuntu

uncut lightBOT
#

Curvy Linux User

lean robin
#

maybe i should change my fstab to mount it on /run/media/$USER instead of /media?

lilac anchor
#

no, doesn't change
just erase the entry and let udisks mount it

lean robin
#

okay

#

what's the udisks command btw never used this before 🙂

lilac anchor
#

your file manager uses udisks to mount stuff, you can use that

lean robin
#

i don't know i had to install it just now

#

thunar?

lilac anchor
#

also it's udisksctl mount -b /dev/blabla

lean robin
#

ty

#

i dont have to enable it with systemctl or anything?

lilac anchor
#

it should have started automatically

lean robin
#

okay

#

yeah btop says its running will try that its not done moving the files so i don't want to touch it yet

lean robin
#

i didn't copy it yet

lilac anchor
#

oh, then /mnt/hdd/SteamLibrary was just there then

lean robin
#

you mean /media/hdd/SteamLibrary?

#

this dir was created by steam when i chose for the game to be installed on the hdd

lilac anchor
#

hm???
then why is it owned by root

you didn't sudo steam right?

lean robin
#

nah you can't even sudo steam it errors saying you cant run it root

lilac anchor
#

okay, yeah, sounds like a mount option issue

lean robin
#

it's wierd though, coz i do have other games(not through steam) but through wine + lutris on this ntfs drive and they work fine

lilac anchor
#

yeah, one reason is cause lutris makes wine prefixes in ~/.local/share/lutris

lean robin
#

aha

#

interesting

lilac anchor
#

steam puts it in SteamLibary/steamapps/compatdata

#

so each steam library has one, but thing is
if your steamlibrary is on na ntfs
wine can't make the wine prefix

#

one workaround is to use symlinks

lean robin
#

yeaaah

#

gonna try that

#

so i just need to move the compatdata dir to anywhere in my /home/$USER and leave a symlink where i yanked it out?

lilac anchor
#

okay so to sum up

  1. remove fstab entry and then run systemctl daemon-reload
  2. mount with udisksctl udisksctl mount -b /dev/blabla
  3. make a compatdata symlink
lean robin
#

lmao ty. and by make a compatdata symlink just move the existing dir /media/hdd/SteamLibrary/steamapps/compatdata to anywhere in /home/$USER and leave a symlink where i yanked it out right?

lilac anchor
#

more like, replace it with a symlink to an empty folder

lean robin
#

so delete the compatdata dir then create a dir in /home/$USER then symlink the empty dir to /media/hdd/SteamLibrary/steamapps/compatdata ?

lilac anchor
#

ye

#

except it's /run/media/$USER

#

cause udisksctl mounts it there

lean robin
#

right right

#

sounds good

#

it's not done i was copying 300 gigs worth of mp3 gosh i hope i don't loose my music lmao

#

thanks a lot though

lilac anchor
#

thank me later, we're not done yet :v

lean robin
#

lmao if this doesn't work bro i'm just gonna format this drive

lean robin
#

didn't work 😦

#

symlinked and everything

lilac anchor
#

well, sudo chown -r $USER:$USER /run/media/$USER/blabla/SteamLibrary

#
UUID=44B0AB5EB0AB54E8 /mnt/Windows ntfs3 nodev,nofail,x-gvfs-show,uid=1000,gid=1000,umask=0000,windows_names 0 0
```here is my mount options for example
uncut lightBOT
#

Curvy Linux User
Compile Error! Click the errors reaction for more information.
(You may edit your message to recompile.)

lean robin
#

my mount options are different 😦

$ findmnt /run/media/pum/New\ Volume
TARGET                    SOURCE    FSTYPE OPTIONS
/run/media/pum/New Volume /dev/sda1 ntfs3  rw,nosuid,nodev,relatime,uid=1000,gid=984,iocharset=utf8,windows_names
#

i'm just gonna format this drive

#

the users are correct now btw

lilac anchor
#
  1. add the rw and exec options
  2. sudo chown -r $USER:$USER /run/media/pum/New\ Volume/SteamLibrary
#

goddamnit latex bot

lean robin
#

how do i add the rw and exec options :))

uncut lightBOT
#

Curvy Linux User

lilac anchor