1

For development purposes I'm using www-data (on an ubuntu 11.10 server) to ssh in and fire git commands and basic stuff against the webroot.

I don't have things like command history, coloring, etc like I do when I ssh in as any other user, so I'm curious how to get this working.

I'm assuming I need a `.bashrc' file, but I'm not sure what to include or (more importantly since I could just copy the one from another user) where it goes.

Fluidbyte
  • 119
  • 1
  • 6

1 Answers1

2

Hmm. You can't do this with some other (proper) user with group permissions and the like?

If you insist on using www-data as your user, you can edit /etc/passwd and change the shell from /bin/sh to /bin/bash and then puttingin the a proper .bashrc and .bash_profile into the home directory (which, as it happens, is also the default webroot, so this may not be ideal). This may cause odd things to happen, though I can't think of anything odd off-hand. This is a relatively "permanent" solution, in that you'll be modifying and emplacing files.

Alternatively, if this is a temporary situation, once you're logged in, just run /bin/bash and you will be in bash. You can source a .bashrc that lives someplace other than $HOME. In this case, your running bash environment will go away once you exit the shell.

cjc
  • 24,916
  • 3
  • 51
  • 70