Drupal: .htaccess Access Deny
August 21, 2014 – 7:59 am | No Comment

In this article I will tell how to forbid access to certain resources for some clients. The instructions will include descriptions of different directives.

Read the full story »
CSS Templates

Contain reviews and news about CSS Templates.

Freebies

Contain freebies such as icons, graphics, headers and images for your websites.

Fun Stuff

Contains other fun stuff for entertainment or interesting site showcase.

How-To

Contain technical elaborations on some specific workarounds or common tweak.

Joomla Templates

Contains reviews and news about Joomla templates.

Home » How-To

Drupal: How To Copy Files To A Server

Submitted by on September 20, 2010 – 8:17 amNo Comment

Problem: It is necessary to copy (upload) file or files to a server.

Solutions:

  • Use FTP
  • Use SCP
  • Copy via SSH
  • File manager in hosting control panel

Use FTP

You need FTP client to connect to FTP-server. There are many FTP-clients, they have different interfaces, additional abilities and licenses.

Attention! It is dangerous to save passwords in FTP-client which saves them opened. If your computer will be infected, the passwords can be stolen and sites – hacked. Use software that encrypts passwords and/or use antivirus.

You need the following data to connect to FTP-server:

  • IP-address or FTP server domain name
  • Username
  • Password
  • Port (it is necessary to enter port if it is non-standard, i.e. differs from 21)

Use SCP

scp command allows copying of files through SSH-connection. You can use scp command:

Copying through SSH

Upload local archive to “path-on-server” folder on “server-name” server:

$ cat ./drupal.tar.gz | ssh user@server-name -pport “cat > /path-on-server/drupal.tar.gz”

Compress fo;es and upload them to server:

$ tar czf – /local-path/copied-files| ssh user@server-name “cat > /pah-on-server/data.tgz”

File manager in hosting control panel

If there is one file, or file is small or there are a few files, and you don’t satisfied with previous solutions, you can user file manager. Usually hosting control panel has it. When creating a web-interface file, a file is created  in the name of web-server and web-server is is their owner. This means that you can meet problems deleting these files (but they can be renamed/moved).

Different hostings use different software so there would be different file managers.

The main principle of this method is the following:

  1. Open hosting control panel in your browser (hosters should give you this address)
  2. Login to panel.
  3. Open file manager.
  4. Navigate to required folder.
  5. Create a file with required name.
  6. Open local files that contains content you wish to put on a server.
  7. Copy content from local file to clipboard.
  8. Open the created file on server.
  9. Paste data from clipboard.
  10. Save file changes on server.
  11. Verify.

Pay attention to encoding!

Copy by means of Drupal

If Drupal is installed, Upload module is enabled and you have permissions to attach files to articles, you can upload a file using a form of files attaching when node creating. The file will be located in a folder set on “File system” page (admin/settings/file-system).
Then you can move it via SSH or with the help of FTP-client.

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.