Sublime Forum

Sublime does not flag read-only files

#1

Hello, I have a bug where the sublime does not tag read only files when I am editing a symbolic link that points to a read only file, my symbolic link has read and write properties, but the file it points to does not.

Sublime 3 did not have this issue.

Thank you for your help!

0 Likes

#2

Identical to Sublime Text 4 does not show a pop up when saving a read only file which I cannot reproduce. That screenshot is Lubuntu 23.10 x64 if that matters.

0 Likes

#3

Hello jfcherng , mind sharing the details of your Sublime 4 version?

0 Likes

#4

latest, 4173

0 Likes

#5

I’m at 4169, I’ll try updating and come back with the result, thank you for your help!

0 Likes

#6

@jfcherng Any ideas?

image

0 Likes

#7

That’s new enough. I don’t think updating from 4169 to 4173 will help. It’s just not obvious why it happens…

0 Likes

#8

4173 is a dev build. Not on the stable channel.

0 Likes

#9

Do you know if any Sublime safe mode that it initializes without any plugin and other addons? I have heard of it if i remember correctly. I want to isolate possible disfunctions

0 Likes

#10

I don’t think that’s something a plugin can interfer but I can sent a screenshot here once I go home.

0 Likes

#11

@jfcherng

I think i may have found some clues from the terminal

It seems to be asking for privileges to check that maybe ?!

0 Likes

#12

Very likely. The other post, whose files are controlled by a VCS, is likely stuck at asking for auth as well.

@bschaaf I think you will be interested in this.

0 Likes

#13

Looks like you don’t have pkexec configured correctly.

0 Likes

#14

@bschaaf

I know this question may not be exactly related to Sublime itself but could you please describe a bit further the pkexec issue or how would we be able to correct it?, we were not able to trace any pkexec back to our configuration.

Thank you for your help on this issue!

0 Likes

#15

Sorry I don’t know how to configure pkexec. Linux distributions like Ubuntu configure it correctly out of the box. Sublime Text runs either pkexec or gksudo in order to prompt for administrator privileges.

0 Likes

#16

@bschaaf

From the pkexec man pages,

“In the normal case (where administrator authentication is required every time pkexec is used), this is not a problem since if the user is an administrator he might as well just run pkexec bash to get root.”

It seems to be running in the normal case, which is undesirable since we do not want to be inputting the password every time we save a file

Funnily enough, sublime 3 does not appear to have such an issue

Also from the manpages:

pkexec allows an authorized user to execute PROGRAM as another user. If username is not specified, then the program will be executed as the administrative super user, root.

does the pkexec call inside sublime has a username specified, not to be using the root, as is our case?

0 Likes

#17

Funnily enough, sublime 3 does not appear to have such an issue

What exact file & folders permissions and ownership do you have? Overwriting a file that’s read-only but owned by me works without root permissions on my end. pkexec is used in cases where the current user cannot change the file permissions.

0 Likes

#18

IDK if that helps, but this is what I am working with, I am rsilvestre

We have acquired Sublime licenses for the whole office, and the programmers are not able to use the program due to this issue, we would like a more hands on costumer support if that is possible! Let me know.

0 Likes

#19

Those all look like symlinks. What are the permissions of the targets? Also what is the permission of the directory containing these files?

0 Likes

#20

All files are read-only. The utility manages the links.

-r–r--r-- 1

The source directory does not give read-write to users, but only execute.

drwx–x--x

0 Likes