Xanashi / Icaros

Official issue tracker and download location for Icaros Shell Extensions
621 stars 7 forks source link

[BUG] No read and write permissions to Ram Disk #74

Closed 921j closed 8 months ago

921j commented 9 months ago

I creat a ram disk by Primo Ramdisk Server 6.6.0, My OS is Win10 22H2 19045.3271 and logon with adminitrator. I want change Icaros's cache location to it, but Icaros popup a tips " no read and write permissions...", I have already changed many software's ( PhotoShop, Chrome, FireFox... ) cache folder to ram disk, the first time I encountered a prompt without reading and writing permissions with Icaros. Please tell me how to solve this issues.

Xanashi commented 9 months ago

The folder must have 'Full control' permissions set for the following users to work with both IcarosConfig and File Explorer:

Current user: YOURSYSTEM\YourUsername or BUILTIN\users Current admin: BUILTIN\Administrators

I'm not sure how permissions work on Ramdisk, but make sure these permissions are enabled in the target folders properties.

921j commented 9 months ago

2023-10-16_092309

As shown in the picture, partition Z: is my RamDisk. Regardless of whether it is "exFAT" format or "NTFS" format, I cannot find the "Security" label in the property page and set it; And because the exFAT format is used, granting EveryOne permissions in Primo RamDisk's settings is grayed out. However, I remember that even when RamDisk used NTFS format and gave Everyone all permissions, Icaros also had this prompt, I only see this situation on Icaros, other programs can use RamDisk normally.

A trial version of Primo RamDisk is available here: I installed PrimoRamdisk_Srv_Mui_Setup_6.6.0.exe https://www.romexsoftware.com/en-us/primo-ramdisk/download.html

Xanashi commented 9 months ago

The reason why Icaros is special in this regard, is because Icaros must make sure the dllhost.exe that runs the thumbnail provider can also access this folder, when it generates thumbnails in Explorer. The dllhost.exe process is running with the current users permissions.

IcarosConfig itself will ask you if you want it to apply the proper user permissions to your chosen cache folder. I assume you accepted. If that fails, there is probably something odd going on when setting folder permissions on a RamDisk drive. Btw, you only need to set the permissions of the cache folder itself, not the entire drive.

I'll check out RamDisk as soon as I have the time, and see if I can reproduce the issue.

921j commented 9 months ago

I forgot to say that the attribute page of the folder in RamDisk is not a "security" label too.

It can be read and write normally to change the thumbnail cache location (%LocalAppData%\Microsoft\Windows\Explorer) of the Win10 Explorer to Ramdisk, and total commander's OK too , but the iCarosconfig's thumbnail cache location is changed. Even if the prompt is accepted, there is an exclamation mark.

Xanashi commented 9 months ago

I'll see if I can reproduce the issue, and get back to you.

Xanashi commented 9 months ago

Hi 921j,

I just tested, but didn't run into any issues. I created a Ramdisk with the default settings. I changed the default Icaros cache location to a new folder I created on the Ramdisk. Icaros gave me the read/write access warning. I told it to setup the correct permissions, and then it worked as expected.

I was however also able to view the "Security" tab in the properties of my Ramdisk folder. When creating your Ramdisk do you change any of the default settings?

clsid2 commented 9 months ago

Maybe because the partition is exFAT instead of NTFS?

Xanashi commented 9 months ago

@clsid2 You're right, that's it. For some reason I thought 921j said they had changed the drive to NTFS above, but they just recalled using NTFS at another point.

So after a little investigating on my end, it appears that FAT32 and exFAT does not have ACLs, and thus no security tab. I assume that means Everyone always has access to these drives, so I should check in my code if the cache folder is on such a filesystem, before checking for permissions. Hopefully that will fix this issue.

921j commented 8 months ago

In the past few years, I was using Ramdisk and iCaros. I remember that I didn't know "exFAT" at that time, so I have always been NTFS, but at that time, ICAROS had a prompt reading and writing permissions, including giving "everyone" permissions, but in fact some ICAROS files were generated in RAMDISK, but I did not know that it had no effect. Later, I changed the thumbnail cache location to other places. But this year I accidentally learned that exFAT's certain performance is better than NTFS, so I changed Ramdisk to exFAT format.

Xanashi commented 8 months ago

Hi 921j,

This should be fixed in #82