Accessing your files: Difference between revisions

From ULYSSIS documentation
mNo edit summary
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Next to running commands, you can also use the shell servers to access your files. There are several methods to do this, some graphical, some not. The former definitely are the easiest option to go for.
This documentation article will explain how to upload, download, move and delete files on your account using a graphical user interface. If you are a more advanced user, you may want to use the command line to administer your files, in that case [[Accessing shell servers over SSH]] is probably a more relevant documentation page for you.


On the server, your files are located in <code>/home/group/username/</code>. For a normal user with username <code>username/</code> this will be <code>/home/user/username/</code>, for an organisation with username <code>organisation/</code> this will be <code>/home/org/organisation/</code> etc.
Many different SFTP clients are available depending on your needs and what operating system you run on your computer. For Windows and Mac users, we recommend the graphical SFTP client [https://cyberduck.io/download/ Cyberduck]. If you're using Linux, your file manager usually has a built-in option to connect using the details mentioned in [[#Connecting | Connecting]].


==Connecting==
==Connecting==


===Linux===
{{notice|Keep in mind|Our automatic security systems may temporarily prevent you from connecting over SSH/SFTP if you try to connect several times with the wrong username and/or password. This will result in the connection being refused. You can switch between sftp://ssh1.ulyssis.org and sftp://ssh2.ulyssis.org when this happens or wait 10 minutes. More information on our security measures is available on [[ULYSSIS security measures]]}}


Linux normally gives you the option to connect to a server graphically. On Ubuntu, in "Files", choose "Connect to server." using the following options:
A Cyberduck-specific explanation can be found at [[#Connecting_2 | Cyberduck: Connecting]]. To access your files using another program you will have to enter the following connection details:
<ul>
* Protocol: SFTP
<li>Server Address: sftp://ssh1.ulyssis.org or sftp://ssh2.ulyssis.org</li>
* Server: "ssh1.ulyssis.org" or "ssh2.ulyssis.org"
</ul>
* Port: 22
 
* Username: your ULYSSIS account username, the one you use for [https://ucc.ulyssis.org ucc.ulyssis.org]
If you are connecting for the first time, you will need to accept the identity of the server.
* Password: your ULYSSIS account password
Enter your username and password and connect, if necessary, unlock your keyring by entering your computer's password.
 
This will open up a file browser connected to the remote server. Here, you can create new files, delete files, upload files (by copying or dragging them in the file browser), download files (by copying or dragging them from the file browser), change file rights etc.
 
If your distribution does not contain an option to connect to a server, you can use [https://filezilla-project.org/ FileZilla], which is completely free. See the instructions under [[Accessing_your_files#Windows|Windows]].
 
[[File:UbuntuConnectToServer.png]]
 
===Windows===
 
Windows doesn't support native remote file browsers, so you will have to download a program first. A good option is [https://filezilla-project.org/ FileZilla], which is completely free. Download it, install it and run it.
 
==== Using the quickconnect bar ====
<ul>
<li>Host: sftp://ssh1.ulyssis.org or sftp://ssh2.ulyssis.org</li>
<li>Username: your username</li>
<li>Password: your password</li>
<li>Port: 22 (you can leave this blank)</li>
<li>Connect to ULYSSIS by clicking on Quickconnect</li>
</ul>
[[File:FileZillaQuickconnect.png]]
 
==== Using the site manager ====
<ul>
<li>Go to Files, Site Manager...</li>
<li>Add a new site</li>
<li>Host: ssh1.ulyssis.org or ssh2.ulyssis.org</li>
<li>Port: 22 (you can leave this blank)</li>
<li>Protocol (dropdown menu): SFTP - SSH File Transfer Protocol</li>
<li>Logon Type (dropdown menu): Normal
<li>User: your username</li>
<li>Password: your password</li>
</ul>
[[File:FileZillaSiteManager.png|Right]]


===Mac===
On our servers, your files are stored in your home folder located at <code>/home/(group)/(username)/</code>, where the group depends upon your account type and the username is your ULYSSIS account username. Any regular user is stored within the <code>user</code> group, and their files are stored within <code>/home/user/(username)</code>. For organizations, <code>org</code> is used, so files are stored within <code>/home/org/(username)</code>. Most (S)FTP clients will by default display your own home folder after you've logged in.


''[https://filezilla-project.org/ FileZilla], which was mentioned above, is also available for Mac. To use it, follow [[#Windows|the instructions for Windows]]. You can also opt for [http://cyberduck.io/ Cyberduck], though. In that case, follow the instructions below.''
==Using Cyberduck==
 
To get started, download [https://cyberduck.io/download/ Cyberduck] from the official website. You can then install the downloaded file like you would install any other application. Once installed, launch Cyberduck and connect using the steps below.
Download the free and open source program [http://cyberduck.io/ Cyberduck]
 
Follow the installations instructions and afterwards open Cyberduck in your Applications folder.
 
Click on 'Open Connection' in the left top corner.


=== Connecting ===
<ul>
<ul>
<li>Dropdown menu: SFTP (SSH File Transfer Protocol)</li>
<li>Click on Open Connection in the top-left corner.</li>
<li>Server: ssh1.ulyssis.org or ssh2.ulyssis.org</li>
<li>Protocol (upper dropdown menu): "SFTP (SSH File Transfer Protocol)"</li>
<li>Port: you can leave the default value</li>
<li>Username: your ULYSSIS account username, the one you use for [https://ucc.ulyssis.org ucc.ulyssis.org]</li>
<li>Username: your username</li>
<li>Password: your ULYSSIS account password</li>
<li>Password: your password</li>
<li>Server: "ssh1.ulyssis.org" or "ssh2.ulyssis.org"
</ul>
<li>Enable "Save Password" if you don't want to enter your password every time you want to connect using this computer</li>
 
<li>Press connect</li>
[[File:maccyberduck3.png]]
</ul>[[File:Open-connection-WB.png|alt=|left|frame]]
 
Click on 'Connect' and you're done.
 
By dragging and dropping you can manipulate files from and to your Mac.
 
If you want to connect again later on, you can just click the Bookmarks icon on the top left.
Next you click on History.
And then you can double click to re-open the connection.


==Using FileZilla==
If you get a dialog window about an unknown fingerprint, tick the "Always" box in the bottom left and then click allow. You will now be connected and able to access your files.
When you connect to a server using FileZilla, the following layout will appear:
[[File:Fingerprint dialog window.png|none|alt=|frame]]
[[File:Base_layout.png|700px|Right]]


As you can see, the local files are located on the left-hand side, while the remote (server) files are located on the right-hand side. File navigation and paths are also present.
When you connect to a server using Cyberduck, the remote files will appear:
[[File:Layout.png|700px|Right]]
[[File:Cyberduck connection interface.png|none|alt=|frame]]


To transfer a file or folder, you can drag and drop it, either from the local side to the remote side, or from the remote side to the local side. These operations represent uploading and downloading respectively.
===Navigating===
[[File:Transfer.png|700px|Right]]
You can open a folder by double-clicking it. To go back up one step you can press the "Up" button to the right of the "Current Folder" dropdown.
To go back up multiple steps you can click on the "Current Folder" dropdown and select which folder you would like to go back to.[[File:Navigating-WB.png|none|alt=|frame]]


You can also press enter while selecting a file, or double-click a file, to transfer it.
===Viewing hidden files===
[[File:Transfer2.png|700px|Right]]
To make hidden files, whose filename always start with a '.', visible, click on View -> Show Hidden Files. This is necessary because some files like ".htaccess" and ".user.ini" are hidden by default and they need to be edited sometimes.
[[File:Hidden Files.png|none|thumb]]


To open a folder, you can double-click it, or press enter while selecting it.
===Uploading files and folders===
[[File:Open.png|700px|Right]]
To upload a file or folder, you can use the "Upload" button in the top menu bar and select the file or folder you wish to upload using your file manager.
[[File:Cyberduck-upload-button.png|alt=|frame|left]]


You can delete files or folders by pressing the delete button while selecting them, or by right-clicking and clicking 'delete'.
Or you can drag and drop it from your file manager (Explorer for Windows, Finder for Mac) into the current folder in Cyberduck.
[[File:Delete.png|700px|Right]]
[[File:Upload-drag-WB.png|none|alt=|thumb|514x514px]]


To create files or folders remotely, you can right-click the remote window and click 'create directory' or 'create new file'.
===Downloading files and folders===
[[File:Create_directory.png|700px|Right]]
To download files and folders, you can drag and drop it into your file manager (Explorer for Windows or Finder for Mac), just like uploading but in the other direction. For files specifically it's also possible to simply double-click the file. This will then download it to your Downloads folder.
[[File:Create_file.png|700px|Right]]


As you can see, the menu has some more interesting options, for example 'rename' or 'view/edit'.
===Creating and Deleting files and folders===
To create a folder, you right click where you want your folder to be located and then click the "New Folder" option as seen below. You can then type a name for your new folder.


==Non-graphical methods==
To create a file, you right click in the folder where you want your file to be located and then click the "New File" option as seen below. You can then type a name for your new file, making sure to include the necessary extension (e.g. file.txt for a text file, file.php for a PHP file, etc.).


You can also use a terminal (on Linux) or Putty (on Windows) to access your files. Connect to the server as described above, and use commands as <code>cd</code>, <code>ls</code>, <code>mkdir</code>, <code>rm</code>, <code>nano</code> or <code>chmod</code> to manage your files.
You can delete a file or folder by selecting it and then either pressing the "Delete" key on your keyboard, or right-clicking and selecting "Delete".
You can also use <code>scp</code> (secure copy) to copy files from and to the servers (don't use <code>ssh</code> first). For example, to copy a file called <code>file.txt</code> to your home dir on the server, use (with <code>username</code> your username and <code>/home/user/username</code> your home dir as described above):
[[File:Delete-cyberduck-WB.png|alt=|thumb|384x384px|none]]


<code>scp file.txt username@ssh1.ulyssis.org:/home/user/username
===Editing files===
</code>
Cyberduck allows you to edit files remotely by selecting a file and then pressing the "Edit" button in the top menu bar, next to the "Upload" button. This opens the file in your text editor (by default Notepad for Windows and TextEdit for Mac). After you're done editing, make sure to save the file using the text editor and then close it.
[[File:Edit.png|none|alt=|frame]]


For other examples and more info, see http://www.hypexr.org/linux_scp_help.php.
[[Category:Files]]
[[Category:Shell]]

Latest revision as of 10:57, 9 August 2021

This documentation article will explain how to upload, download, move and delete files on your account using a graphical user interface. If you are a more advanced user, you may want to use the command line to administer your files, in that case Accessing shell servers over SSH is probably a more relevant documentation page for you.

Many different SFTP clients are available depending on your needs and what operating system you run on your computer. For Windows and Mac users, we recommend the graphical SFTP client Cyberduck. If you're using Linux, your file manager usually has a built-in option to connect using the details mentioned in Connecting.

Connecting

NoticeKeep in mind

Our automatic security systems may temporarily prevent you from connecting over SSH/SFTP if you try to connect several times with the wrong username and/or password. This will result in the connection being refused. You can switch between sftp://ssh1.ulyssis.org and sftp://ssh2.ulyssis.org when this happens or wait 10 minutes. More information on our security measures is available on ULYSSIS security measures


A Cyberduck-specific explanation can be found at Cyberduck: Connecting. To access your files using another program you will have to enter the following connection details:

  • Protocol: SFTP
  • Server: "ssh1.ulyssis.org" or "ssh2.ulyssis.org"
  • Port: 22
  • Username: your ULYSSIS account username, the one you use for ucc.ulyssis.org
  • Password: your ULYSSIS account password

On our servers, your files are stored in your home folder located at /home/(group)/(username)/, where the group depends upon your account type and the username is your ULYSSIS account username. Any regular user is stored within the user group, and their files are stored within /home/user/(username). For organizations, org is used, so files are stored within /home/org/(username). Most (S)FTP clients will by default display your own home folder after you've logged in.

Using Cyberduck

To get started, download Cyberduck from the official website. You can then install the downloaded file like you would install any other application. Once installed, launch Cyberduck and connect using the steps below.

Connecting

  • Click on Open Connection in the top-left corner.
  • Protocol (upper dropdown menu): "SFTP (SSH File Transfer Protocol)"
  • Username: your ULYSSIS account username, the one you use for ucc.ulyssis.org
  • Password: your ULYSSIS account password
  • Server: "ssh1.ulyssis.org" or "ssh2.ulyssis.org"
  • Enable "Save Password" if you don't want to enter your password every time you want to connect using this computer
  • Press connect

If you get a dialog window about an unknown fingerprint, tick the "Always" box in the bottom left and then click allow. You will now be connected and able to access your files.

When you connect to a server using Cyberduck, the remote files will appear:

Navigating

You can open a folder by double-clicking it. To go back up one step you can press the "Up" button to the right of the "Current Folder" dropdown.

To go back up multiple steps you can click on the "Current Folder" dropdown and select which folder you would like to go back to.

Viewing hidden files

To make hidden files, whose filename always start with a '.', visible, click on View -> Show Hidden Files. This is necessary because some files like ".htaccess" and ".user.ini" are hidden by default and they need to be edited sometimes.

Hidden Files.png

Uploading files and folders

To upload a file or folder, you can use the "Upload" button in the top menu bar and select the file or folder you wish to upload using your file manager.

Or you can drag and drop it from your file manager (Explorer for Windows, Finder for Mac) into the current folder in Cyberduck.

Downloading files and folders

To download files and folders, you can drag and drop it into your file manager (Explorer for Windows or Finder for Mac), just like uploading but in the other direction. For files specifically it's also possible to simply double-click the file. This will then download it to your Downloads folder.

Creating and Deleting files and folders

To create a folder, you right click where you want your folder to be located and then click the "New Folder" option as seen below. You can then type a name for your new folder.

To create a file, you right click in the folder where you want your file to be located and then click the "New File" option as seen below. You can then type a name for your new file, making sure to include the necessary extension (e.g. file.txt for a text file, file.php for a PHP file, etc.).

You can delete a file or folder by selecting it and then either pressing the "Delete" key on your keyboard, or right-clicking and selecting "Delete".

Editing files

Cyberduck allows you to edit files remotely by selecting a file and then pressing the "Edit" button in the top menu bar, next to the "Upload" button. This opens the file in your text editor (by default Notepad for Windows and TextEdit for Mac). After you're done editing, make sure to save the file using the text editor and then close it.