[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: vim



On Thu, 15 Nov 2012 05:18:52 -0800
james gray <kmzftq@gmail.com> wrote:

> i am just wondering.
> 
> why would vim be slapped around thru many links just to come back to
> its original file path origin with out write privileges to the end
> usr who is not root.
> 
> 
> path = /usr/local/bin, usr/bin, /bin, usr/local/game
> 
> 
> which vim
> 
> /usr/bin/vim
> 
> 
> ls -l /usr/bin/vim
> 
> lrwxrwxrwx -> etc/alternatives/vim
> 
> 
> ls -l etc/alternatives/vim
> 
> lrwxrwxrwx -> /usr/bin/vim.basic
> 
> 
> ls -l /usr/bin/vim.basic
> 
> -rwxr-xr-x
> 
> 
> are there programming or script conditionals placed on vim by vim
> being passed through each different directory environment ?.
> 
> 
> is there a for see able security issue coming from the programers view
> point , to have vim.basic with its file access as they are root root
> rwxr-xr-x.
> 
> Or
> 
> can the end usr mutilate the file access and group of vim.basic and
> change to:
> 
> root admin rwxrwx---
> 
> 
> Thank you

Softlinks always are rwxrwxrwx and all applications a normal user and
superuser can use are r-xr-x for the group and for the others, since
only root should be allowed to delete or write to your system. If you
are editing a file, the permissins of the editor are irrelevant. What
counts are the permissins of the file the user wants to edit.

Simply test what happens, if a user tries to change permissions for the
original file and what happens if a user tries to delete a softlink,
just "touch" some test-file and "ln -s" some test-links and do this in
directories with different permissions.

Regards,
Ralf


Reply to: