0 Permission di Linux



< Permissions and ownership - why? >

If you can't access some of the files on your very own Linux system, it's usually because of misconfigured file access permissions. If you are the only user on your Linux box, you may be wondering what's the point of having all these permissions (or lack thereof) that restrict your access to your very own penguin OS. However, before pulling your hair off, you must keep in mind Linux is designed to be a multi-user environment. In an environment with more than one users, it is crucial to have a secure system for deciding which files are yours and who can fiddle with them.

Even if you're the only user on an ordinary desktop system, file permissions help keeping your important files safe, both from outsiders and your own mistakes. :)

< Understanding file ownership >

Every file on your Linux system, including directories, is owned by a specific user and group. Therefore, file permissions are defined separately for users, groups, and others.

User: The username of the person who owns the file. By default, the user who creates the file will become its owner.

Group: The usergroup that owns the file. All users who belong into the group that owns the file will have the same access permissions to the file. This is useful if, for example, you have a project that requires a bunch of different users to be able to access certain files, while others can't. In that case, you'll add all the users into the same group, make sure the required files are owned by that group, and set the file's group permissions accordingly.

Other: A user who isn't the owner of the file and doesn't belong in the same group the file does. In other words, if you set a permission for the "other" category, it will affect everyone else by default. For this reason, people often talk about setting the "world" permission bit when they mean setting the permissions for "other."

< Understanding file permissions >

There are three types of access permissions on Linux: read, write, and execute. These permissions are defined separately for the file's owner, group and all other users.

Read permission. On a regular file, the read permission bit means the file can be opened and read. On a directory, the read permission means you can list the contents of the directory.

Write permission. On a regular file, this means you can modify the file, aka write new data to the file. In the case of a directory, the write permission means you can add, remove, and rename files in the directory. This means that if a file has the write permission bit, you are allowed to modify the file's contents, but you're allowed to rename or delete the file only if the permissions of the file's directory allow you to do so.

Execute permission. In the case of a regular file, this means you can execute the file as a program or a shell script. On a directory, the execute permission (also called the "search bit") allows you to access files in the directory and enter it, with the cd command, for example. However, note that although the execute bit lets you enter the directory, you're not allowed to list its contents, unless you also have the read permissions to that directory.

< How to view file permissions >

You can view the access permissions of a file by doing the long directory listing with the ls -l command. This is what a long directory listing might look like:

me@puter: /home/writers$ ls -l
total 17
drwxr-xr-x 3 nana writers 80 2005-09-20 21:37 dir
-rw-r----- 1 nana writers 8187 2005-09-19 13:35 file
-rwxr-xr-x 1 nana writers 10348 2005-07-17 20:31 otherfile

What does the output of ls -l mean? The very first column, the one that looks like a bunch of mumbo jumbo, shows the file type and permissions. The second column shows the number of links (directory entries that refer to the file), the third one shows the owner of the file, and the fourth one shows the group the file belongs to. The other columns show the file's size in bytes, date and time of last modification, and the filename.

The first column, the one that shows the file's permissions and looks like mumbo jumbo, is organized into four separate groups, although it certainly doesn't look very organized.

The first group consists of only one character, and it shows the file's type. For example, d means a directory and - means a normal file, so if you take a look at our example output, you'll notice dir is a directory, while file and otherfile are regular files.

The first character can be any of these:

d = directory
- = regular file
l = symbolic link
s = Unix domain socket
p = named pipe
c = character device file
b = block device file

The next nine characters show the file's permissions, divided into three groups, each consisting of three characters. The first group of three characters shows the read, write, and execute permissions for user, the owner of the file. The next group shows the read, write, and execute permissions for the group of the file. Similarly, the last group of three characters shows the permissions for other, everyone else. In each group, the first character means the read permission, the second one write permission, and the third one execute permission.

The characters are pretty easy to remember.

r = read permission
w = write permission
x = execute permission
- = no permission

What does this mean in practice? Let's have an example. Remember the imaginary directory listing we did at the beginning? The output looked like this:

drwxr-xr-x 3 nana writers 80 2005-09-20 21:37 dir
-rw-r----- 1 nana writers 8187 2005-09-19 13:35 file
-rwxr-xr-x 1 nana writers 10348 2005-07-17 20:31 otherfile

As we already noticed, dir is a directory, because the first column begins with a d. The owner of this directory is user nana and the group owner is writers. The first three characters, rwx, indicate the directory's owner, nana in this case, has full access to the directory. The user nana is able to access, view, and modify the files in that directory. The next three characters, r-x, indicate that all users belonging to group writers have read and execute permissions to the directory. They can change into the directory, execute files, and view its contents. However, because they don't have write permissions, they can't make any changes to the directory content. Finally, the last three characters, r-x, indicate that all the users who are not nana or don't belong into group writers, have read and execute permissions in the directory.

How about file? Because the first column begins with a -, the file is a regular file, owned by user nana and group writers, just like the directory in our example. The first three characters, rw-, indicate the owner has read and write access to the file. According to the next three characters, r--, the users belonging to group writers can view the file but not modify or execute it. The final three characters, ---, indicate no one else has any access to the file.

Similarly, you can see otherfile is a regular file and its owner has full access to it, while everyone else can read and execute the file but not modify it.

< How to set file permissions - symbolic mode >

You can set file permissions with the chmod command. Both the root user and the file's owner can set file permissions. chmod has two modes, symbolic and numeric.

The symbolic mode is pretty easy to remember. First, you decide if you set permissions for the user (u), the group (g), others (o), or all of the three (a). Then, you either add a permission (+), remove it (-), or wipe out the previous permissions and add a new one (=). Next, you decide if you set the read permission (r), write permission (w), or execute permission (x). Last, you'll tell chmod which file's permissions you want to change.

Let's have a couple of examples. Suppose we have a regular file called testfile, and the file has full access permissions for all the groups (long directory listing would show -rwxrwxrwx as the file's permissions).

Wipe out all the permissions but add read permission for everybody:
$ chmod a=r testfile
After the command, the file's permissions would be -r--r--r--

Add execute permissions for group:
$ chmod g+x testfile
Now, the file's permissions would be -r--r-xr--

Add both write and execute permissions for the file's owner. Note how you can set more than one permission at the same time:
$ chmod u+wx testfile
After this, the file permissions will be -rwxr-xr--

Remove the execute permission from both the file's owner and group. Note, again, how you can set them both at once:
$ chmod ug-x testfile
Now, the permissions are -rw-r--r--

As a summary, have a look at this quick reference for setting file permissions in symbolic mode:
Which user?
u user/owner
g group
o other
a all
What to do?
+ add this permission
- remove this permission
= set exactly this permission
Which permissions?
r read
w write
x execute

< How to set file permissions - numeric mode >

The other mode in which chmod can be used is the numeric mode. In the numeric mode, the file permissions aren't represented by characters. Instead, they are represented by a three-digit octal number.

4 = read (r)
2 = write (w)
1 = execute (x)
0 = no permission (-)

To get the permission bits you want, you add up the numbers accordingly. For example, the rwx permissions would be 4+2+1=7, rx would be 4+1=5, and rw would be 4+2=6. Because you set separate permissions for the owner, group, and others, you'll need a three-digit number representing the permissions of all these groups.

Let's have an example.
$ chmod 755 testfile
This would change the testfile's permissions to -rwxr-xr-x. The owner would have full read, write, and execute permissions (7=4+2+1), the group would have read and execute permissions (5=4+1), and the world would have the read and execute permissions as well.

Let's have another example:
$ chmod 640 testfile
In this case, testfile's permissions would be -rw-r-----. The owner would have read and write permissions (6=4+2), the group would have read permissions only (4), and the others wouldn't have any access permissions (0).

The numeric mode may not be as straightforward as the symbolic mode, but with the numeric mode, you can more quickly and efficiently set the file permissions. This quick reference for setting file permissions in numeric mode might help:
Which number?
0 ---
1 --x
2 -w-
3 -wx
4 r--
5 r-x
6 rw-
7 rwx
[Read More...]


0 Membuat openSUSE 11.0 LiveUSB



Dalam posting sebelumnya, saya menulis tentang panduan "Membuat openSUSE Live USB menggunakan KIWI". Tulisan tersebut bisa diikuti sebagai dasar melakukan proses remastering openSUSE namun membutuhkan proses yang cukup panjang untuk mendapatkannya. Beberapa distro menyediakan cara yang relatif mudah dan openSUSE "Semestinya" bisa juga :-D . Tak ada masalah dengan KIWI karena KIWI menyediakan berbagai pilihan remastering, misalnya untuk membuat LiveUSB openSUSE, LiveCD, QEMU Image, VMWare Image, dan XEN Image tapi ada kalanya kita membutuhkan beberapa penyesuaian yang belum ada pada KIWI.

Saya mencari berbagai topik dan dan cara untuk membuat openSUSE Live USB dan beberapa diantaranya cukup menarik untuk dicoba. Setelah mencoba dan mereview beberapa tips, berikut adalah cara termudah membuat openSUSE Live USB menggunakan sistem Windows :-P .

Mengapa harus menggunakan Windows ? Tentu saja tidak ada keharusan. Penggunaan sistem Windows ditujukan bagi para pengguna Windows yang ingin mencoba openSUSE menggunakan LiveUSB tanpa harus melakukan instalasi dan tanpa harus takut ada masalah dengan data dan sistem yang ada.

Berikut adalah summary dari proses pembuatannya :
KEUNTUNGAN

  1. Tutorial ini dapat digunakan baik di Windows maupun di Linux. Letak perbedaan hanya pada proses pembuatan bootable Live USB (penggunaan syslinux)
  2. Tidak memerlukan proses instalasi openSUSE terlebih dahulu seperti halnya KIWI. Hanya memerlukan prose download ISO LiveCD dan tools untuk ekstrak ISO (utility gratis 7-zip bisa melakukannya)
  3. Dapat menggunakan file sistem FAT 32 sehingga USB Flash Disk tetap dapat digunakan untuk menyimpan file dari Windows, Linux maupun Mac.
  4. Mudah, hanya perlu beberapa langkah singkat
  5. Proses cepat, membutuhkan waktu beberapa menit saja. Proses terlama adalah melakukan copy ISO image sebesar 700 MB ;-)

PERSIAPAN

  1. Siapkan USB Flash Disk minimal 1 GB
  2. Download versi terakhir dari syslinux
  3. Download hasil modifikasi initrd - namanya initrdud - dari uploads Blog Vavai. Modifikasi initrd ini memuat perubahan boot dari CD ke USB dan penambahan modules NLS untuk character set FAT 32
  4. Download ISO openSUSE LiveCD. Saat tulisan ini dibuat, saya menggunakan openSUSE 11.0 RC 1

MEMBUAT BOOTABLE LIVEUSB

  1. Jalankan Windows
  2. Tancapkan USB Flash Disk
  3. Ekstrak hasil download syslinux
  4. Buka DOS Prompt (Command Prompt)
  5. Pindah ke folder hasil ekstrak syslinux, masuk ke folder win32
  6. Jalankan perintah syslinux -ma driver-letter-of-flash-disk, misalnya : syslinux -ma E: dengan E adalah driver USB Flash Disk. Note : Proses pembuatan bootable disk sangat cepat jadi jangan menunggu berlama-lama :-D

PROSES PEMBUATAN LIVE USB

  1. Tancapkan ulang USB Flash Disk yang sudah bootable
  2. Buat folder sementara untuk hasil ekstrak ISO LiveCD, misalnya folder liveiso
  3. Ekstrak ISO LiveCD menggunakan 7-zip atau winrar ke folder liveiso
  4. Copy semua isi dari liveiso ke USB Flash disk
  5. Copy semua isi folder boot/i386/loader ke USB Flash disk (ke root folde, bukan didalam folder. Maksudnya, copy ke drive E: bukan ke kedalam folder di drive E: )
  6. Rename file isolinux.cfg yang ada di root folder USB Flash disk menjadi syslinux.cfg
  7. Copy file initrdud hasil download ke root folder USB Flash Disk
  8. Buat perubahan kecil pada file syslinux.cfg agar menggunakan initrdud, bukan initrd. Lakukan perubahan pada baris ini : append initrd=initrd ramdisk_size=512000 ramdisk_blocksize=4096 splash=silent showopts menjadi append initrd=initrdud kiwidebug=1 ramdisk_size=512000 ramdisk_blocksize=4096 splash=silent showopts Opsi kiwidebug=1 akan menampilkan pesan error apapun :-D ke terminal

TESTING

  1. Boot komputer dengan prioritas boot adalah USB HDD. Sebagian besar komputer terbaru mestinya sudah mendukung pilihan ini. Jika menggunakan laptop atau komputer yang mendukung perubahan boot on the fly, ubah pilihan dengan menekan tombol keyboard F12, F8, F9 atau tombol lain sesuai dengan konfigurasi komputer anda
  2. Saat booting, tekan ENTER saat ada pilihan untuk boot. Mengetik tulisan Live-System seperti yang diminta akan menimbulkan pesan kesalahan. KIta dapat memodifikasi pesan ini namun hal ini tidak terlalu bermasalah andaikan dibiarkan demikian adanya :-)


SCREENSHOT INSTALASI DARI LIVEUSB
Screenshot instalasi dan panduan lengkap dapat ditemukan pada Halaman Tutorial Website Komunitas openSUSE Indonesia

CREDIT
Terima kasih pada Manivas untuk tutorialnya.

[Read More...]


0 Linux - Distroisme



"Perseteruan" antara linux user dan salah satu OS yang banyak dipakai di dunia pada jaman beberapa tahun yang lalu sangat kentara terlihat. Meski ada "perdamaian" antara salah satu pemain besar Linux dengan OS yang satu ini, sepertinya "Perseteruan Dingin" ini masih berlanjut. Tidak sedikit "newbies" sudah berani memasang Wallpaper bernuansakan "Peperangan dan Perseteruan" antara Linux OS dan OS tersebut. Banyak juga para artis digital memupuk perseteruan ini dengan gambar-gambar lucu namun nuansa provokatifnya kental sekali.



Jaman terus berlalu dengan tidak terasa. Seiring dengan perkembangan Linux yang super pesat ditambah berkembangnya jumlah distro dengan segudang teknologi dan keindahan desktopnya maka menurut pengamatan saya pengguna Linux kini mulai terkonsentrasi pada berbagai komunitas berbasis distro. Sebutlah di Indonesia ada beberapa komunitas linux atau lebih tepat disebut komunitas distro yang mulai menggeliat, mulai dari yang sudah mapan dan berjumlah banyak anggotanya seperti Komunitas Ubuntu Indonesia, Komunitas OpenSuse Indonesia, dan yang mulai menggeliat Komunitas Fedora Indonesia.

Hal yang menarik terlihat di berbagai forum Linux berbasis distro ini adalah ego dari masing-masing user distro yang dituangkan pada forum milik komunitas distro based itu. Ego yang mengklaim bahwa distro pilihannya lah yang paling oke punya tak jarang menjadi hal yang menggelitik pribadi di luar komunitas atau pihak yang terkait di dalam komunitas tersebut. Tak jarang ada pihak penengah yang menegaskan bahwa Linux lah yang terbaik dan sudah memakai linux itu sudah baik. Ego yang tinggi ini biasanya mengidap pada user yang baru lulus dari tahapan newbie dan pernah dialami pula oleh penulis waktu itu. Hal ini terasa kental pula di setiap institusi yang mulai mengurai ketergantungan akan salah satu produk IT dalam hal ini OS yang berbayar dan mahal ke solusi komunitas. Secara pribadi masing-masing Admin di tiap unit tatkala berdiskusi sarat dengan egoisme sebuah Kotak bernama distro yang kental. Sampai ada komentar lucu di salah satu posting distro 3 besar di dunia dengan menulisan "Perang Distro".

Padahal di dunia nyata penggunaan linux sangat beragam untuk tujuan tertentu. dan yang memang cocok untuk router dan gateway, ada yang cocok untuk server dan ada yang memang cocok hanya untuk dekstop. Kini setelah berkenalan dengan para user dari distro yang lain (lintas distro) bahwa memang pada dasarnya Distro Linux sendiri mulai menekankan dan berfokus pada rasa dan arah mereka sendiri dan pangsa pengguna tertentu pula. Masing-masing distro punya plus dan minus masing-masing, begitu juga para user. Ada yang lebih senang tantangan, ada pula yang senang dengan kemudahan dan ketidakribetan dalam instalasi dan konfigurasi.

[Read More...]


0 Sharing Telkomsel Flash Unlimited di PCLinuxOS



Sharing internet pada jaringan komputer bukanlah hal yang sulit saat ini, bahkan pada jaringan yang memiliki beberapa perbedaan pada sistem operasi di tiap - tiap komputernya sekalipun.

Pada artikel kali ini akan di bahas mengenai sharing koneksi internet dengan menggunakan PCLinuxOS sebagai Gateway dan Ms. Windows atau Linux lainnya sebagai client.

Alasan saya menggunakan Linux sebagai gateway adalah kemampuan filter serangan dari luar yang lebih bagus di bandingkan dengan menggunakan Windows sebagai Gateway.



Pada saat saya menulis artikel ini saya mengunakan PCLinuxOS TinyMe 2008 pada Notebook Fujitsu Pentium III yang saya fungsikan sebagai Mobile Computing dan Gateway pada Lab saya. Pada dasarnya penggunaan dan konfogurasi PCLinuxOS lainnya sama saja dengan PCLinuxOS yang saya gunakan.

* Pastikan ada login sebagai root
* Siapkan 1 Unit komputer yang sudah terinstall PCLinuxOS dengan 1 atau lebih NIC pada komputer tersebut.
* Sambungkan PCLinuxOS kedalam jaringan (LAN) anda baik meggunakan kabel ataupun perangkat wireless. Disini saya menggunakan kabel UTP sebagai jalur komunikasi IP (Internet Protocol) dalam jaringan saya.
* Setelah PCLinuxOS tersambung dan semua komputer bisa berhubungan dengan PCLinuxOS maka langkah selanjutnya adalah membuat sambungan koneksi internet pada PCLinuxOS. Disini saya menggunakan keoneksi internet Dial Up GSM dari Telkomsel Flash (Telkomsel Flash Unlimited ) dengan menggunakan mini USB kabel dan Motorola V3i sebagai modem. Untuk tipe koneksi internet lainnya bisa di sesuaikan dan di konfirmasikan kepada pihak Provider anda.
* Karena saya menggunakan koneksi internet dial up maka saya gunakan Gnome PPP sebagai dialer yang sudah include pada instalasi PCLinuxOS TinyMe2008. Setelah saya pasang modem motorola jalankan Gnome PPP dan masuk ke bagian konfigurasi dengan melakukan klik pada tombol setup.
* Setelah window konfigurasi terbuka klik tombol detect untuk mendeteksi modem secara otomasi. Pastikan modem anda di dukung oleh PCLinuxOS .
* Setelah modem terdeteksi klik pada tombol Init String dan masukan ATCommand pada AT1.... karena saya menggunakan Telkomsel Flash Unlimited string yang saya gunakan adalah sebagai berikut : AT+CGDCONT=1,"IP","internet"
* Setelah itu klik OK untuk keluar dari windows Command.
* Masukan no dial yang di tuju.....karena saya menggunakan Dial up GSM maka dial number yang saya gunakan adalah *99# atau *99***1#
* Setelah itu klik tombol OK untuk keluar dan kembali ke dialer Gnome PPP.
* Isikan Username yang sama dengan APN dan begitu juga dengan Password.
* Isikan dial number *99# atau *99***1#
* Setelah semua selesai coba klik tombol Connect untuk melakukan koneksi.
* Saya anggap semua berjalan lancar. Setelah internet tersambung lakukan setting sharing internet dari PCC (PClinuxOS Control Center)
* Pilih menu Network and Internet dan pilih share internet......
* Konfigurasi dengan Telkomsel Flash Unlimited :
* IP Telkomsel Flash : 192.168.100.101
* Primary DNS Server : 202.3.208.10
* Secondary DNS Server : 202.3.210.10
* Masukan IP Telkomsel Flash di kolom gateway PCLinuxOS dan masukan IP DNS server Telkomsel Flash di kolom DNS Server PCLinuxOS
* Konfigurasikan semu yang di minta oleh PCLinuxOS sesuai dengan jaringan LAN anda....
* Biasanya PCLinuxOS akan meminta anda untuk melakukan istalasi Shorewall, lakukanlah instalasi shorewall secara otomatis, apabila gagal melakukan instalasi secara otomatis lakukan instalasi dengan menggunakan Synaptic.
* Setelah konfigurasi PCLinuxOS selesai, konfigurasikan NIC di komputer - komputer client dengan memasukan IP Gateway PCLinuxOS dan DNS dari Provider.
* Setelah semua konfigurasi berjalan dengan benar tiap - tiap komputer yang terhubung dengan gatewai PCLinuxOS bisa menikmati internet sacara bersamaan dengan komputer lain.

Sumber : http://www.pclinuxos-id.org

[Read More...]


0 Setting Modem Smart Ac2726 di Linux Fedora 12



udah banyak tutorial ini di internet sih, tapi kek nya semua kurang komplit. kali ini aq mo mo buat tutorial setting modem smart ac2726 di linux fedora 12 (untuk selain f12 bisa mencari paket rpm yang sesuai).ok langsung aja, karena kita belum bisa online (ea jelas, modem aja blum di setting). jadi kita unduh paket rpm dibawah ini di warnet yaw..


[Read More...]


 

Katagori

About me..

I was born 23 year ago in small city wonogiri. And now I studies in UKDW Yogyakarta.
Return to top of page Copyright © 2010 | Platinum Theme Converted into Blogger Template by HackTutors