Ubuntu server 8.04 using VI to edit files

  • devilwood
  • Silver Member
  • Silver Member
  • User avatar
  • Posts: 447

Post 3+ Months Ago

I'm still getting used to the command line of the bare ubuntu server edition. I've currently installed vsftpd and I'm having a few issues with it.

1. Editing .conf or text files with VI is just horrible. It's completely unstable and does not do what I want it to. So, first is there another option for editting .conf/text files with just the command line server version of ubuntu?

2. Where can I find VI text editor commands? I finally found shift+z will save a file. I need a list of most of them.

3. I was editting my vsftpd.conf file and I'm now it's telling me I need to recover and/or delete the swap file. Also, the vsftpd.conf is now set to read-only so I can't finish my changes. I just need any explanation as to what is going on here. I do get a message to (add ! to override) but I'm not sure how to use that.

4. My initial problem was that when transferring files to my var/www/ directory the files are getting no permissions set. They were getting 600 and 700 attached and I really need it to automatically put 644 on anything transfered to my web directory. SO,

I added to my vsftpd.conf file:

restarted vsftpd and it still not working. SO, I was going to try a 4-digit value for those options when I started getting the problem in #3.

Thanks for any help.
  • kc0tma
  • o|||||||o
  • Web Master
  • User avatar
  • Posts: 3314
  • Loc: Trout Creek, MT

Post 3+ Months Ago

Does vi really not do what you want it to, or are you just not telling vi the right things to do? Remember: Garbage in, Garbage out.

Some of your most common vi commands will be :wq to save, :q! to quite without saving, :w to simply save and not quit, \searchterm to search for something..... Do a google search for vi commands.

For your swap file thing, if you go to the directory with your vsftp.conf file and do an ls -a, you should see a file ending in .swp <- that is the swap file. I had a squid config file go funky on me last week and it made that swp file and the way I wound up fixing it was by doing cp squid.conf.swp squid.conf and then told it yes to overwrite the original squid.conf, so you could try the same thing but exchange squid.conf with vsftp.conf. That might not be the best way to fix it, Don or Anarchy will correct me if there is a better way.
  • devilwood
  • Silver Member
  • Silver Member
  • User avatar
  • Posts: 447

Post 3+ Months Ago

As soon as I posted I tried vi commands in google and got a list. Google didn't give me that before.

With VI the keys were not working. I would toggle replace and insert using the insert key but no other keys would work to make changes or line breaks. Then I got a ton of @ signs showing up and unlimitied values for local_umask. So it looked like this in VI:

@ etc etc for a little ways down then
local_umask=022022022022022022022022 etc etc forever

I yanked the file ftp to look at it and it looked fine. I then used nano to edit it and I have no problems editing the data. Also, the file looks good under nano.

Last thing.
I still am not getting permissions set when i transfer files to my www/ folder. Changing the local_umask and adding file_open_mode=666 is not working. Any ideas on what I can try? All my searches say for permissions to automatically be set on file transfers to use local_umask. I'm not logged in anonymously but I'm connect as my created user. The created user is also added to a created group www-data.

I'll check your command with the swap file if it happens again, but I'd already just restored the file using

vim -r /etc/vsftpd.conf

so no more problems there.

thanks again for the help.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 12 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.