Author Topic: SFTP and root access  (Read 1751 times)

neggard

  • Zen Apprentice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
SFTP and root access
« on: June 01, 2013, 07:51:05 pm »
Hello!
I just have 1 user, the one you did in the installation step.

Now I have made 3 virtual domain and when I use filezilla with SFTP and connect to /srv/www/domain
Problem is when I tried to upload something I have no access.

I know the system dont have a password for root and for security it should not be used.
So how could I connect to the place and upload files to my webpages?

neggard

  • Zen Apprentice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: SFTP and root access
« Reply #1 on: June 01, 2013, 08:24:46 pm »
Now I tried to use ssh to connct to server and use su
But it dosent work so how do I transfer files?

ctek

  • Zen Warrior
  • ***
  • Posts: 197
  • Karma: +6/-1
    • View Profile
Re: SFTP and root access
« Reply #2 on: June 04, 2013, 11:31:06 pm »
after you have the files on the server (Ex: in the user's home directory) via filezilla or winscp or whatever method you want, use sudo to do the operations
ex: sudo mc
or
ex: sudo cp /path/to/file/file1 /destination/of/file/

But pay attention to the rights of the files! since they will be owned by root (sudo) and you must change them to www-data owner for them.

Best regards
Bogdan