1837140 Members
2338 Online
110112 Solutions
New Discussion

Restrictive editor

 
Jack C. Mahaffey
Super Advisor

Restrictive editor

Is there anyway to restrict running vi against a specific file by disabling vi's ability to touch a different file?

I've got sudo on my servers and I would like to be able to restrict vi to access only the filename provided on the command line.

sudo vi will run vi against the . I can, however, write over or access other files once the session starts.

jack...

1 REPLY 1
Claudio Cilloni
Honored Contributor

Re: Restrictive editor

I don't know if vi can be limited (but I don't think so). You could avoid using sudo, let vi to be lanched using normal user permissions, and give this user the read and write permissions only against the files he/she should access.

hth
Claudio