Symlinks no longer working properly + Permission issues

If the problems still exist even after the great help above, you might want to check the folder (and file) permissions and owners on all levels under the /mnt folder tree.

1 Like

Only I use the computer, so it’s not much of a problem, I think.

Admittedly, that does make me worried it could potentially mess with the permissions of several game executables I have. However…

Doing this, I noticed that, already, several game files and executables - even WINE ones - have throroughly fucked permissions, such as a setup.exe from a game I installed through Lutris suddenly being set to the 1001 group and only having Read permissions despite me having never touched it on Fedora. I don’t get it.

Frankly, I’m seriously considering just nuking my entire HDD’s partition and restarting from scratch - and mounting it on /home so I don’t have to deal with the nightmare of trying to fix this huge mess. The main problem is that my HDD is where I put pretty much all my major files in, and I really don’t wish to lose all that stuff. If I compress it into an archive and put it on an USB/external storage device or on a cloud drive or something, wipe the drive and re-download the backups and extract it all onto my hard drive again, would those files automatically have the proper ownerships and read/write permissions, or would they inherit my current setup’s screwed permissions and ownership?

If anything, I at least want to make the backups in case running the commands Kresimir suggested end up further damaging my files or anything like that…

For example: on CinnVIIStarkMenu, I’m able to choose some shortcuts to folder directory locations that appear on my start menu:

Pretty much all of them work, except “Pictures, Junk, etc” never shows up despite it being listed as visible. I initially was using the symlinks for those shortcuts, and I thought it was a symlink issue, but even the folder itself doesn’t show up - and it’s just that folder.

Likewise, on Euro Truck Simulator 2, it reads mod files from within the “Documents” folder on its Proton prefix: /mnt/Secondary Volume/Game Installations - Steam/steamapps/compatdata/227300/pfx/drive_c/users/steamuser/Documents/Euro Truck Simulator 2/mod. That is quite the mouthful, so I simply put my mod files on /mnt/Secondary Volume/Backups - Manual/Euro Truck Simulator 2/mod (the “backup” folder was just a placeholder location I wound up never changing), deleted the “mod” folder from the Proton prefix, and symlinked the second mod folder to Documents to replace it, letting Proton think my mods are inside the Proton prefix when, in fact, they aren’t.

This always worked for me, but after switching and doing that whole chmod command thingy, suddenly Proton is completely ignoring the existence of that symlinked folder and acts like I do not have a mod folder at all, even after deleting the symlink and recreating it to match the new mount location. The ETS2 folder containing my actual mod files seems to be owned by that weird 1001 group and only has “Access files” permissions, but the mod files themselves seem good:

I don’t know anymore. I’m just cursed with technology, it seems.

An off-the-wall question here - could any of those games be struggling with the spaces in the directory names? I’d be tempted to rename them (perhaps with _ instead of spaces) and then checking the troublesome programs.

Of course - I could be just over obsessed with ‘style’ too! :grin:

How much work did you put in to switch over to the current mount point on those ‘other’ programs? If you remounted it where you used to have it, how much work would that be?

OTOH - you have an expert helping already - so I’ll leave it at that… :grin:

You should always have a backup. Hard drives just break on their own, all the time, and users do stupid things (I lost data many times, for example I once used rsync with a wrong path, destroying all data on my backup drive. Luckily, it was only a backup, but I could have easily destroyed something important. Not even an advanced superhuman AI like @dalto is immune to making user mistakes that cause data loss). Data loss happens all the time, backup is the only way to prevent it.

Everything that is important should be backed up, preferably more than once, and on external storage. Hard drives are fairly cheap nowadays, WD Blue, which are very reliable, cost some $30-40 per terabyte. Get yourself a nice external HDD case which you can connect to the PC via USB. Everything that is important should be backed up on such drives, disconnected from the computer.

That said, you can run the command I posted above, for changing the ownership for any file owned by the 1001 group to tadpole:tadpole:

find "~/Music" -group 1001 -exec chown tadpole:tadpole {} \;

If you want, you can run first as a test in some folder where you have files owned by the 1001 group. If it works and nothing terrible happens (it really shouldn’t), then you can run it on your entire drive. Always quote your paths, so that spaces in filenames do not mess up the command.

You can do a dry run first, by omitting the exec part of that command:

find "~/Music" -group 1001

This will just list all files owned by the group 1001, but it won’t change anything.

So once you change the ownership to tadpole:tadpole, see if that fixes any problems. I doubt it will, but who knows…

No, that won’t be necessary. :sweat_smile:

1 Like

I ran the pure find version of the command and it gave me a colossal list of files owned by 1001. I bit the bullet and ran it with -exec, and it gave me a smaller list of files that errored. Is this normal?

tadpole@Sanctuary:~$ find '/mnt/Secondary Volume' -group 1001 -exec chown tadpole:tadpole {} \;
chown: changing ownership of '/mnt/Secondary Volume/Game Installations - Lutris/Need for Speed - Classic/dosdevices/z:': Operation not permitted
chown: cannot dereference '/mnt/Secondary Volume/Game Installations - Lutris/Need for Speed - Classic/dosdevices/e:': No such file or directory
chown: cannot dereference '/mnt/Secondary Volume/Game Installations - Lutris/Need for Speed - Classic/dosdevices/e::': No such file or directory
chown: changing ownership of '/mnt/Secondary Volume/Game Installations - Lutris/Need for Speed - Classic/dosdevices/d::': Operation not permitted
chown: cannot dereference '/mnt/Secondary Volume/Game Installations - Lutris/Need for Speed - Classic/drive_c/users/tadpole/Downloads': No such file or directory
chown: cannot dereference '/mnt/Secondary Volume/Game Installations - Lutris/Need for Speed - Classic/drive_c/users/tadpole/AppData/Roaming/Microsoft/Windows/Templates': No such file or directory
chown: changing ownership of '/mnt/Secondary Volume/Game Installations - Lutris/The Sims/dosdevices/z:': Operation not permitted
chown: changing ownership of '/mnt/Secondary Volume/Game Installations - Lutris/The Sims/dosdevices/d::': Operation not permitted
chown: cannot dereference '/mnt/Secondary Volume/Game Installations - Lutris/The Sims/drive_c/users/tadpole/Downloads': No such file or directory
chown: cannot dereference '/mnt/Secondary Volume/Game Installations - Lutris/The Sims/drive_c/users/tadpole/AppData/Roaming/Microsoft/Windows/Templates': No such file or directory
find: ‘/mnt/Secondary Volume/lost+found’: Permission denied

It’s not really that, because I never had issues with spaces before…

What does

ls -l '/mnt/Secondary Volume/Game Installations - Lutris/Need for Speed - Classic/dosdevices/z:'

print?

“Operation not permitted” errors happen when your user does not have privileges to change the ownership (this can easily be fixed with sudo, but some care is needed).

“cannot dereference” error usually means a broken symlink, so check that.

This “permission denied” error in the “lost+found” directory is okay, you should not change ownership of that. You can see what the output of ls -l on that is, too.

It looks like it points to the root folder, so it’s understandable that it gives an error.

tadpole@Sanctuary:~$ ls -l '/mnt/Secondary Volume/Game Installations - Lutris/Need for Speed - Classic/dosdevices/z:'
lrwxrwxrwx 1 tadpole 1001 1 Dec 16 09:56 '/mnt/Secondary Volume/Game Installations - Lutris/Need for Speed - Classic/dosdevices/z:' -> /

Anyway, I checked tadpole/Downloads and Templates, and they are indeed symlinks I forgot to fix and update, so it’s not too bad at least.

Now I just have to check if the issue with symlinks was fixed…

1 Like

Oh dear! :sweat_smile:

This is why you shouldn’t run chmod or chown recursively with sudo. If you mess up the permissions on your root directory, the only sensible way to fix that is to reinstall the OS. You should delete this symlink.

1 Like

Feeling more and more like it’s better to just start over from scratch tbh… my command has already caused quite a lot of damage, and who knows what else got messed up? :c

No, I don’t think that command did anything. I think all your problems are due to changing the mountpoint of your drive.

Are the issues with symlinks fixed now that no files are owned by the group 1001?

No, they’re still not being recognized.

Yeah, I thought so…

Try renaming that “Pictures, Junk, etc” directory into something more concise and see if you can add it to your CinnVIIStarkMenu, whatever that is. Make sure there are no mistakes in the path. All those spaces that get changed to %20 are making me nervous…

I suspect the reason for this strange behaviour is something silly. It has nothing to do with permissions, and I suspect it has nothing to do with symlinks, either.

…Oh, wow. That actually made it show up for some reason.

I’m confused, because this kind of stuff was never an issue before…

1 Like

Yeah, just as I thought. It’s some silly error, nothing to do with permissions or symlinks :rofl:

Perhaps there is a limit to the path length in this CinnVIIStarkMenu? Or something like that… Who could know?

1 Like

That might be it, yeah…

Still, there remains the issue where Proton continues to refuse to acknowledge my symlink’s existence. :confused: ETS2 continues insisting that I have no mods installed…

Try the same solution. Create a new directory, with some concise name and copy the mods to it. Then make a symlink.

Or just keep the mods in their proper place in the prefix directory, and make a symlink for yourself elsewhere pointing to that directory, so you can find it easily.

2 Likes

Good news - I resolved the symlink issue!! And it was a really stupid cause, too.

I tried to create a new directory with a shorter name as you suggested, but Proton still didn’t recognize the mods. I got frustrated and, because I didn’t have any other ideas, decided to try changing my mountpoint from /mnt/Secondary Volume back to /home/tadpole/Storage. I really wasn’t expecting anything out of it, but would you look at that - it’s working again! I’m guessing the issue was with the /mnt folder refusing to be read by symbolic links due to it being owned by root or something like that - and it adds up, because when I was using the Proton symlinks earlier I was still mounting my HDD on /home. Frankly, I don’t care what elitists say, I’m gonna mount my drive on /home from now on because it’s what works for me, plus Linux is about freedom anyway and I’m free to use it as I see fit.

The only issue I still have left is that my files still seem to be screwed from my command. I, uh, found out that I actually did run sudo chmod -R +x /mnt/'Secondary Volume' instead of /dev/sdb, and on closer inspection of my files, several of them were flagged as executable even though they’re not meant to be. (Including my Steam library… which is huge and has symlinks to my root folder. Hopefully the worst of it is over because I ran it while I was still on Fedora and I’ve since reinstalled it.) It sounds kind of dangerous to retain, so I’d really like to figure out a way to fix this mess I’ve created.

I was planning on backing up all my files and repartitioning my HDD, but… I found out that doing this will still retain their screwed-up permissions as ext4 remembers the permissions of files, so that plan kinda went out the window. What should I do?

1 Like

After a while of mustering the courage to do so, I ran the commands you listed here. I was successfully able to give my files the proper permissions on Linux again! So far, everything has been working well, so I’m flagging this as the solution.

Thank you so much for helping me through this!

3 Likes

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