Sample Header Ad - 728x90

sudoedit root owned file in a non-root directory

11 votes
1 answer
12279 views
Why can't I edit files owned by root but being e.g. somewhere deep in my personal directory, it says: > sudoedit: existingFile: editing files in a writable directory is not permitted While I have the following function defined:
function sunano {
    export SUDO_EDITOR='/usr/local/bin/nano'
    sudoedit "$@"
}
And I edit like this: sunano existingFile Where the file is indeed owned by root: ls -l existingFile Proves that: > -rwxr-xr-x 1 root root 40 Jun 15 2015 existingFile
Asked by Vlastimil Burián (30515 rep)
Apr 5, 2017, 02:58 PM
Last activity: Nov 2, 2023, 08:58 PM