Ticket #1727 (new enhancement)

Opened 15 years ago

Last modified 11 years ago

mc ask for sudo password when is needed.

Reported by: gnusci Owned by:
Priority: major Milestone: Future Releases
Component: mc-core Version: 4.7.0-pre3
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

Using mc in sudo mode is not a good idea. Therefore, it will be more useful if you can do some sudo operations without quit mc or runnig it in sudo mode.

Change History

comment:1 Changed 15 years ago by s01ja

the workaround for this is maybe the user menu:

copy the diff user menu (.mc/menu) and create a sudo copy

as mc implements the fs-actions herself. it would be necessary to elevate the complete mc process and i would not be happy when my user-mc suddenly gets root just because sudo is caching the permissions or does not ask for a password.

although it would be nice to change the default behavior of f5/f6 to do something else (like sudo cp instead of cp, or svn cp, scp or rsync.) this could also be used to spawn background copy or even queued background copy using a external script.

comment:2 follow-up: ↓ 4 Changed 15 years ago by andrew_b

How to recognize that sudo asks password?

comment:3 Changed 13 years ago by andrew_b

  • Branch state set to no branch
  • Milestone changed from 4.7 to Future Releases

comment:4 in reply to: ↑ 2 Changed 13 years ago by ossi

Replying to andrew_b:

How to recognize that sudo asks password?

poll the pty for the echo flag. http://api.kde.org/4.x-api/kdelibs-apidocs/kdesu/html/process_8cpp_source.html#l00377 (no, this does not qualify for "elegant")

comment:5 in reply to: ↑ description Changed 11 years ago by davidqo

Replying to gnusci:

Using mc in sudo mode is not a good idea. Therefore, it will be more useful if you can do some sudo operations without quit mc or runnig it in sudo mode.

What about to make mirror to folder which requires root permissions? For example:
sudo bindfs --mirror-only=username /usr/local/lib ~/LIB_FILESYSYEM
It is usable for me, because using it I don't need to run mc as root or run commands from shell with sudo. All operations in ~/LIB_FILESYSTEM will affect also /usr/local/lib and not requires root permissions.
Read bindfs.org for more info.

Note: See TracTickets for help on using tickets.