Goals for This Lecture:

Similar documents
Permission and Ownership

Lecture 2b. Pathnames, files, special characters in filenames, and file permissions. COP 3353 Introduction to UNIX, FALL 2013

Exercise Sheet 2. (Classifications of Operating Systems)

commandname flags arguments

Traditional Access Permissions

CS Fundamentals of Programming II Fall Very Basic UNIX

Operating Systems, Unix Files and Commands SEEM

Read the relevant material in Sobell! If you want to follow along with the examples that follow, and you do, open a Linux terminal.

Basic File Attributes

Outline. UNIX security ideas Users and groups File protection Setting temporary privileges. Examples. Permission bits Program language components

The Unix Shell. Permissions

An Introductory Tutorial on UNIX

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

CS : Computer Programming, Spring 2000 Programming Project #1: Thinking of a Number Due in class Thursday 27 January 2000

CSC 453 Operating Systems

CSE II-Sem)

Introduction. SSH Secure Shell Client 1

AN INTRODUCTION TO UNIX

CSN08101 Digital Forensics. Module Leader: Dr Gordon Russell Lecturers: Robert Ludwiniak

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

Introduction to Linux Workshop 1

Traditional Access Permissions

Exploring UNIX: Session 3

Introduction to the Linux Command Line

CS 200. User IDs, Passwords, Permissions & Groups. User IDs, Passwords, Permissions & Groups. CS 200 Spring 2017

Unix L555. Dept. of Linguistics, Indiana University Fall Unix. Unix. Directories. Files. Useful Commands. Permissions. tar.

UNIX File Hierarchy: Structure and Commands

Operating systems fundamentals - B10

Files

Linux Tutorial #6. -rw-r csce_user csce_user 20 Jan 4 09:15 list1.txt -rw-r csce_user csce_user 26 Jan 4 09:16 list2.

1 Login AppServ Hosting Control System

Introduction to Unix May 24, 2008

LECTURE 7. Readings: - SSH: The Definitive Guide; D.J. Barret et al.; O Reilly Lecture outline: - SSH. Marco Spaziani Brunella, Manuel Campo

Unit: Making a move (using FTP)

SECTION -C. Getting Started with UNIX

CSC209. Software Tools and Systems Programming.

CSC209. Software Tools and Systems Programming.

IT Essentials II: NOS Linux Labs Using Knoppix

Linux Training. for New Users of Cluster. Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala

Mills HPC Tutorial Series. Linux Basics I

5/8/2012. Encryption-based Protection. Protection based on Access Permission (Contd) File Security, Setting and Using Permissions Chapter 9

Introduction: What is Unix?

Information System Audit Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000)

CENG 334 Computer Networks. Laboratory I Linux Tutorial

Hardware. Ahmet Burak Can Hacettepe University. Operating system. Applications programs. Users

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

Quick Start Guide. by Burak Himmetoglu. Supercomputing Consultant. Enterprise Technology Services & Center for Scientific Computing

Introduction to Linux Workshop 2. The George Washington University SEAS Computing Facility

DELL EMC UNITY: DR ACCESS AND TESTING. Dell EMC Unity OE 4.3

Operating System Security

CS246 Spring14 Programming Paradigm Notes on Linux

CST8207: GNU/Linux Operating Systems I Lab Six Linux File System Permissions. Linux File System Permissions (modes) - Part 1

Part 5: FTP More about this course about Internet

read: permitted to read the contents of directory ( view files and sub-directories in that directory ).

Using UNIX. -rwxr--r-- 1 root sys Sep 5 14:15 good_program

CHAPTER 1 UNIX FOR NONPROGRAMMERS

Aliases are set manually or in a login script. Aliases that were set manually will be gone the next time you login.

Configuring SSH Public Key Authentication

UNIX / LINUX - GETTING STARTED

Unix Groups and Users

5/20/2007. Touring Essential Programs

The UNIX operating system is a set of programs that act as a link between the computer and the user.

Quick Start Guide. by Burak Himmetoglu. Supercomputing Consultant. Enterprise Technology Services & Center for Scientific Computing

CSCI 2132 Software Development. Lecture 5: File Permissions

Privileges: who can control what

Unix and C Program Development SEEM

12/7/10 ATSC 212 UNIX ATSC 212 ATSC 212 UNIX

CS4350 Unix Programming. Outline

Week 2 Lecture 3. Unix

Basic Unix Commands. CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang

TELNET is short for Terminal Network Enables the establishment of a connection to a remote system, so that the local terminal appears to be the

Writing Shell Scripts part 1

acmteam/unix.pdf How to manage your account (user ID, password, shell); How to compile C, C++, and Java programs;

Obtaining and Installing the Updated TSBroadcaster Scripts

Student Remote Login Procedure (see picture below): 1. Start SSH Secure Shell 2. Click the computer icon (4 th on the toolbar) 3.

ACS Unix (Winter Term, ) Page 92

Assume that username is cse. The user s home directory will be /home/cse. You may remember what the relative pathname for users home directory is: ~

Introduction to Linux

CS Operating Systems, Fall 2018 Project #0 Description

Introduction to Lab Practicals (Lab Intro 3) Access Control, Synchronisation and Remote Access

UNIVERSITY OF BOLTON CREATIVE TECHNOLOGIES COMPUTING WITH WEBSITE DEVELOPMENT SEMESTER ONE EXAMINATIONS 2018/2019 UNIX MODULE NO: CPU5003

Users, Groups and Permission in Linux

Oxford University Computing Services. Getting Started with Unix

CSN08101 Digital Forensics. Module Leader: Dr Gordon Russell Lecturers: Robert Ludwiniak

File system Security (Access Rights)

DEPARTMENT OF MATHEMATICS. RAMLab User Guide. An Introduction to the Ryerson Applied Mathematics Laboratory

DELL EMC UNITY: DR ACCESS AND TESTING. Dell EMC Unity OE 4.5

Project #6: Using ssh, scp and sftp with Key-Based Authentication

File Access Control Lists (ACLs)

ORF 201 Computer Methods in Problem Solving. Lab 2: My House, My Home (Page)

Operating Systems Lab 1 (Users, Groups, and Security)

Input/Output. Input/Output and Files. Input/Output. I/O System Objectives

CSCI 2132 Software Development. Lecture 4: Files and Directories

Secure Shell Commands

Unix File System. Class Meeting 2. * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech

Introduction to Linux

Ftp Command Line Commands Linux Example Windows Putty

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Mauro Ceccanti e Alberto Paoluzzi

Introduction to Lab Practicals (Lab Intro 3) Access Control, Synchronisation and Remote Access

Outline. Structure of a UNIX command

Transcription:

Goals for This Lecture: Understand how to log in remotely with SSH Understand how to transfer files with SCP Learn how to log in from SINC site windows PC s with XWIN32 Understand the long form listings produced by the ls command Understand the basics of directory permissions Understand how to change directory permissions using the chmod command

Logging in remotely with SSH It is often highly desireable for you to login to a different Unix system from the one that you are currently logged into. Let's examine how to do this. Avoid using commands like telnet, rsh, and rlogin. They are no longer secure. These commands send your username and passoword over the network in an unencrypted fashion. Using them is asking for trouble. Someone can easily steal your username and password. Use an encrypted method such as secure shell, a.k.a. SSH SSH uses public key encryption to make sure that your username and password are sent over the network in a secure fashion A very good alternative is the secure shell commd ssh

SSH usage The syntax for this command is easy: >ssh -l username remote_machine_name You can execute your commands as you normally would When you are ready to log off of the remote machine just execute the command logout If you have problems connecting with ssh try ssh1 (same syntax) instead. The remote machine may not support level 2 SSH The Mathlab public machine addresses are listed in the /etc/hosts file on any mathlab machine: ella.mathlab.sunysb.edu bird.mathlab.sunysb.edu duke.mathlab.sunysb.edu

Copying files with SCP Copying of files from one machine to another can be accomplished using the SSH scp command Syntax: >scp user1@machine1:frompath user2@machine2:topath This syntax can be simplified if either the "from" file or the "to" file are located on the current machine Example: >scp speech.doc gbush@whitehouse.gov:/home/gbush/speech1.doc Example: >scp bclinton@whitehouse.gov:speech2.doc speech3.doc You will be prompted for your password on the remote machine

ASCII & Binary files Files on Unix systems can consist of two basic types of data: ASCII data -- bytes of data containing codes recognized as alpha-numeric characters Binary data, -- bytes of data which are not recognized as alpha-e numeric characters ASCII = American Standard Code for Information Interchange Example of ASCII files: text files, HTML files, files containing FORTRAN code Example of Binary files: files containing compiled executable code, image files, some data files You can find out what kind of file you are dealing with using the file command. Try using the file command on the various files in your directories.

Long form Listing Fields >ls -al total 44 drwxr-xr-x 3 dswesty users 4096 Feb 11 20:32./ drwxr-xr-x 18 dswesty users 4096 Feb 6 22:00../ -rwxr-xr-x 1 dswesty users 23918 Nov 26 16:28 ftest -rw-r--r-- 1 dswesty users 163 Nov 26 16:28 ftest.f -rw-r----- 1 dswesty users 152 Nov 26 16:24 ftest.f~ drwxr-xr-x 2 dswesty users 4096 Feb 11 20:32 zcode/ The second field is the number of hard links associated with the listed object (not important) The third field is the owner of the listed object The fourth field lists the group associated with the file The fifth field lists the size of the object in bytes The sixth field list the date of the last modification of the file The seventh field lists the time of the last modification of the file The eighth field lists the name of the file or directory

Directory permissions When you do an ls -l command in your current working directory you see a long form listing that looks like: >ls -al total 44 drwxr-xr-x 3 dswesty users 4096 Feb 11 20:32./ drwxr-xr-x 18 dswesty users 4096 Feb 6 22:00../ -rwxr-xr-x 1 dswesty users 23918 Nov 26 16:28 ftest -rw-r--r-- 1 dswesty users 163 Nov 26 16:28 ftest.f -rw-r----- 1 dswesty users 152 Nov 26 16:24 ftest.f~ drwxr-xr-x 2 dswesty users 4096 Feb 11 20:32 zcode/ The output data from this long form listing contains numerous fields that list properties of the files and directories A "d" in column one means that the listed object is a directory Columns 2-10 list the permissions associated with each listed object

Directory permissions >ls -al total 44 drwxr-xr-x 3 dswesty users 4096 Feb 11 20:32./ drwxr-xr-x 18 dswesty users 4096 Feb 6 22:00../ -rwxr-xr-x 1 dswesty users 23918 Nov 26 16:28 ftest -rw-r--r-- 1 dswesty users 163 Nov 26 16:28 ftest.f -rw-r----- 1 dswesty users 152 Nov 26 16:24 ftest.f~ drwxr-xr-x 2 dswesty users 4096 Feb 11 20:32 zcode/ There are three basic types of permission associated with a file: read r, write w, and execute x permissions The permissions come in three sets: for the user who owns the file (the first set), the group (second set), and the other (the third set) Columns 2-4 list the permissions for the owner Columns 5-7 list the permissions for the group Columns 8-10 list the permissions for the world The file owner can change permissions using the chmod command Example: >chmod og-rwx /home_b1/dswesty removes all permissions for the group (g) and others (o) Directories must have both read and execute permissions in order for them to be fully accessible