Sublime Forum

Sudo save

#1

Good morning :smile:

I just updated to rev. 3066 and read something like ā€œsudo saveā€ in the changelog.

Do I get this right that I can open a file as user and if I donā€™t have the proper rights it asks me to save as root? That would be a damn awesome feature :smile:
But I didnā€™t figure out how to do this. There is no new menu entry. And when I save a file I get this message:

Unable to save /etc/httpd/vhosts.d/TEMPLATE Error: /etc/httpd/vhosts.d/TEMPLATE is readonly px_administrator_copy_file(/tmp/.sublb49.tmp, /etc/httpd/vhosts.d/TEMPLATE)

Sublime Log:

Writing file /etc/httpd/vhosts.d/TEMPLATE with encoding UTF-8 (atomic) error: Unable to save /etc/httpd/vhosts.d/TEMPLATE Error: /etc/httpd/vhosts.d/TEMPLATE is readonly px_administrator_copy_file(/tmp/.sublcd4.tmp, /etc/httpd/vhosts.d/TEMPLATE)

STAT:

File: ā€˜/etc/httpd/vhosts.d/TEMPLATEā€™ Size: 423 Blocks: 8 IO Block: 4096 regular file Device: fd01h/64769d Inode: 2883764 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2014-10-16 08:53:34.577099167 +0200 Modify: 2013-10-09 09:01:35.926496530 +0200 Change: 2014-10-16 08:53:18.685453405 +0200 Birth: -

Thank you for any comment, help or question :wink:

Silberling

0 Likes

#2

Iā€™m wondering as well how this works.

0 Likes

#3

Thanks for the detailed report, Iā€™ll look into whatā€™s going on here

0 Likes

#4

This functionality relies on calling "/usr/bin/gksudo /bin/cp ", my guess is that gksudo isnā€™t installed

0 Likes

#5

Iā€™ll make the next build use /usr/bin/pkexec as a fallback for when /usr/bin/gksudo isnā€™t available

0 Likes

#6

Hey :smile:

Thank you for your reply.

That would be really nice because Iā€™m using fedora at work which uses polkit.

Iā€™m really looking forward to use this :smile:

May I ask you, will this feature be available on windows, too? My major work for my own projects (private, at home) is on windows and sometimes this might come in handy, too.
For example: Editing C:\Windows\system32\drivers\etc\hosts is for administrator only, but I use it frequently for managing access to different VMs.

Have a nice day :wink:

Silberling

PS:
While posting this I got an
Words similar to ā€¦ are banned due to spam which I donā€™t really get right now ^^

0 Likes