terminal.cab

Linux Basics Lesson 20 of 38

guestLevel 1Badges and progress0/100 XP, XP to the next levelStreak0

755 and still Permission denied

Detective 90 XP

8 minutes

Learning goals

The file's mode is only half the truth, and the file system has a say as well. To find out how something is mounted, use findmnt or mount. grep is not loaded on this page, so mount | grep /tmp gives you command not found here. findmnt /tmp asks about exactly that one place, and plain mount shows the whole table. On a real server, sudo could change the mount, but it is not loaded here either, and it would be the wrong answer anyway.

Steps

Step 1/4: Start with the obvious. Show mode and owner of /tmp/backup.sh.

Detective 90 XP

The backup script lies in /tmp, it has 755, it belongs to you, and still: bash: /tmp/backup.sh: Permission denied. Another chmod +x changes nothing. Time to look somewhere other than the file.

  1. Step 1

    Start with the obvious. Show mode and owner of /tmp/backup.sh.

  2. Step 2

  3. Step 3

  4. Step 4

Loading terminal …

lerner@web-01: ~bash
lerner@web-01:~$

Esc, then Tab leaves the terminal

Step 1 of 4

Cards

  1. Card 1 of 2

    Tap the card or press Space to turn it over.

  2. Card 2 of 2

    Tap the card or press Space to turn it over.

Cheat sheet

The most important command lines of this module on one A4 page, black and white, to print or keep on your phone.