Skip to content

Commit fb2c64f

Browse files
committed
Version from 2015
0 parents  commit fb2c64f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+5071
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit d952feac61388f192ba74759613cae9884da4b49

presentation/debian.png

136 KB
Loading

presentation/fedora.png

276 KB
Loading
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
\frametitle{Extending permissions --- ACL}\framesubtitle {Access control list}
2+
\begin{itemize}
3+
\item By default, it is not possible to give specific permission to the user who is not owner, nor member of group owing the file
4+
\item In ext4 FS it has to be turned on manually (usually it is by default), it is part of XFS and Btrfs
5+
\item Command \texttt{getfacl} lists those extra permissions
6+
\item When in use, ``basic'' tools listing permissions (e.g. \texttt{ls -l}, ACL in use is marked by ``\texttt{+}'' on the beginning of the line) sometimes do not show correct result
7+
\item Command \texttt{setfacl} sets it
8+
\end{itemize}
9+
\begin{bashcode}
10+
getfacl FILE # get ACL for FILE
11+
setfacl -m u/g:USER/GROUP:r/w/x FILE # Add for USER/GROUP r/w/x right
12+
setfacl -R # Recursive
13+
setfacl -b # Remove all ACL
14+
\end{bashcode}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
\frametitle{Extending permissions --- ACL}\framesubtitle {Access control list}
2+
\begin{itemize}
3+
\item By default, it is not possible to give specific permission to the user who is not owner, nor member of group owing the file
4+
\item In ext4 FS it has to be turned on manually (usually it is by default), it is part of XFS and Btrfs
5+
\item Command \texttt{getfacl} lists those extra permissions
6+
\item When in use, ``basic'' tools listing permissions (e.g. \texttt{ls -l}, ACL in use is marked by ``\texttt{+}'' on the beginning of the line) sometimes do not show correct result
7+
\item Command \texttt{setfacl} sets it
8+
\end{itemize}
9+
\begin{bashcode}
10+
getfacl FILE # get ACL for FILE
11+
setfacl -m u/g:USER/GROUP:r/w/x FILE # Add for USER/GROUP r/w/x right
12+
setfacl -R # Recursive
13+
setfacl -b # Remove all ACL
14+
\end{bashcode}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
\frametitle{Extending permissions --- ACL}
2+
\begin{itemize}
3+
\item Access control list
4+
\item By default, it is not possible to give specific permission to the user who is not owner, nor member of group owing the file
5+
\item In ext4 FS it has to be turned on manually (usually it is by default), it is part of XFS and Btrfs
6+
\item Command \texttt{getfacl} lists those extra permissions
7+
\item When in use, ``basic'' tools listing permissions (e.g. \texttt{ls -l}, ACL in use is marked by ``\texttt{+}'' on the beginning of the line) sometimes do not show correct result
8+
\item Command \texttt{setfacl} sets it
9+
\end{itemize}
10+
\begin{bashcode}
11+
getfacl FILE # get ACL for FILE
12+
setfacl -m u/g:USER/GROUP:r/w/x FILE # Add for USER/GROUP r/w/x right
13+
setfacl -R # Recursive
14+
setfacl -b # Remove all ACL
15+
\end{bashcode}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
\frametitle{Links}
2+
\begin{itemize}
3+
\item Soft links --- like links on the web --- short-cut to another place: \texttt{ln -s source target}
4+
\begin{itemize}
5+
\item When we delete link, nothing happens, when target, non-working link remains
6+
\end{itemize}
7+
\end{itemize}
8+
\begin{bashcode}
9+
ls -l bin/cinema5
10+
lrwxrwxrwx 1 vojta users 42 5. dub 2014 cinema5 -> # "l" marks link
11+
/home/vojta/bin/cinema5-0.2.1-beta/cinema5* # "->" points to target
12+
\end{bashcode}
13+
\begin{itemize}
14+
\item Hard links --- only second name for file already presented on the disk (available only for files): \texttt{ln source target}
15+
\end{itemize}
16+
\begin{bashcode}
17+
ln .bashrc .bashrcX
18+
ls -l .bash* # Numbers in first column show links pointing to it
19+
# For directories - number of items, for files = 1
20+
-rw------- 1 vojta users 27298 21. led 16.43 .bash_history # One link
21+
-rw-r--r-- 2 vojta users 2707 29. lis 16.21 .bashrc # Same data as below
22+
-rw-r--r-- 2 vojta users 2707 29. lis 16.21 .bashrcX # Two links
23+
\end{bashcode}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
\frametitle{Links}
2+
\begin{itemize}
3+
\item Soft links --- like links on the web --- short-cut to another place: \texttt{ln -s source target}
4+
\begin{itemize}
5+
\item When we delete link, nothing happens, when target, non-working link remains
6+
\end{itemize}
7+
\end{itemize}
8+
\begin{bashcode}
9+
ls -l bin/cinema5
10+
lrwxrwxrwx 1 vojta users 42 5. dub 2014 cinema5 -> # "l" marks link
11+
/home/vojta/bin/cinema5-0.2.1-beta/cinema5* # "->" points to target
12+
\end{bashcode}
13+
\begin{itemize}
14+
\item Hard links --- only second name for file already presented on the disk (available only for files): \texttt{ln source target}
15+
\end{itemize}
16+
\begin{bashcode}
17+
ln .bashrc .bashrcX
18+
ls -l .bash* # Numbers in first column show links pointing to it
19+
# For directories - number of items, for files = 1
20+
-rw------- 1 vojta users 27298 21. led 16.43 .bash_history # One link
21+
-rw-r--r-- 2 vojta users 2707 29. lis 16.21 .bashrc # Same data as below
22+
-rw-r--r-- 2 vojta users 2707 29. lis 16.21 .bashrcX # Two links
23+
\end{bashcode}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
\frametitle{Links}
2+
\begin{itemize}
3+
\item Soft links --- like links on the web --- short-cut to another place: \texttt{ln -s source target}
4+
\begin{itemize}
5+
\item When we delete link, nothing happens, when target, non-working link remains
6+
\end{itemize}
7+
\end{itemize}
8+
\begin{bashcode}
9+
ls -l bin/cinema5
10+
lrwxrwxrwx 1 vojta users 42 5. dub 2014 cinema5 -> # "l" marks link
11+
/home/vojta/bin/cinema5-0.2.1-beta/cinema5* # "->" points to target
12+
\end{bashcode}
13+
\begin{itemize}
14+
\item Hard links --- only second name for file already presented on the disk (available only for files): \texttt{ln source target}
15+
\end{itemize}
16+
\begin{bashcode}
17+
ln .bashrc .bashrcX
18+
ls -l .bash* # Numbers in first column show links pointing to it
19+
# For directories - number of items, for files = 1
20+
-rw------- 1 vojta users 27298 21. led 16.43 .bash_history # One link
21+
-rw-r--r-- 2 vojta users 2707 29. lis 16.21 .bashrc # Same data as below
22+
-rw-r--r-- 2 vojta users 2707 29. lis 16.21 .bashrcX # Two links
23+
\end{bashcode}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
\frametitle{Redirects and pipes}
2+
\begin{bashcode}
3+
# Add error output to the end of standard output file
4+
command >> outputfile 2>&1
5+
# Add error output to the error log text file
6+
command >> outputfile 2>error.log
7+
\end{bashcode}
8+
\begin{itemize}
9+
\item /dev/null --- ``black hole'' --- discards everything (don't care about errors?): \texttt{command 2\textgreater~/dev/null}
10+
\item /dev/stdin --- standard input (in case application reads files, not from standard input): \texttt{echo "Žluťoučký kůň" | iconv -f utf-8 -t cp1250 /dev/stdin}
11+
\item /dev/stdout --- standard output (we wish to see errors which would be discarded otherwise): \texttt{command 2\textgreater~/dev/stdout}
12+
\item /dev/stderr --- standard error output (right place to send errors to): \texttt{echo "error" > /dev/stderr}
13+
\end{itemize}

0 commit comments

Comments
 (0)