Beginner Linux questions


-Z-

Still Fresh
Joined
Sep 11, 2008
Messages
26
Do we happen to have a topic for beginner Linux questions? I know I could use one..

I've been googling furiously and trying out stuff, such as adding my user to the card's group and using chmod, but I can't for the life of me get my Pandora to give me write permissions on my SD card after formatting it to ext2  :unsure:
 
sudo chown -R yourusername /media/YOURSDCARD


Doesn't work?


Edit: No clue why you are posting this into the improved SDL thread.


Try the supportsection instead :)
 
Last edited by a moderator:
Do we happen to have a topic for beginner Linux questions? I know I could use one..

I've been googling furiously and trying out stuff, such as adding my user to the card's group and using chmod, but I can't for the life of me get my Pandora to give me write permissions on my SD card after formatting it to ext2  :unsure:

generally you need to do it with root permissions


sudo chmod .... etc

mcobit ninja'd :ph34r:
 
Last edited by a moderator:
When you format the SD card with the ext2 format, you have the option of specifying the volume label with the "-L" option of the mkfs (make file system) script.  The ext2 format is the default.  The Pandora computer can use the volume label to identify the card regardless of the slot in which the card is inserted, so I recommend that you give the card a volume label.  I recommend that you start up your computer with only the SD card that you want to format to avoid formatting the wrong card:

sudo mkfs -L volumelabel   /dev/mmcblk0p1

The "sudo" program causes the rest of the line to be executed as the super user, also known as the root user.  The computer will ask you for a password the first time.  I presume that you have already done something like this, but maybe you did not specify the volume label.

I recommend that you choose a short volume label that contains no spaces to make it easier to type.  I used numbers for my volume labels to identify the sizes of the cards, because I have cards with different sizes.  "mmc" stands for multimedia card.  Multimedia cards looked the same as SD cards and were slower than SD cards, but now its seems that SD, SDHC, and SDXC cards are the most common type of cards with the same shape.  "blk0" refers to the slot in which the card is in.  The first slot in which you insert a single SD card, regardless of whether it is the left slot or right slot, is blk0.  If your Pandora has two SD cards in it when it boots up, then the left card will be blk0, and the right card will be blk1.  The, "p1", stands for partition 1.  If you have multiple partitions on the card, then you have to be careful in specifying which partition number that you want to format.

The Pandora computer seems to make the user name and group name the same when you initially set up the computer.  If your user name and group name is, "user", and the volume label of your card is, "volumelabel", then the following should work to change the owner of your card to you:

sudo chown user:user

sudo chmod 755 /media/volumelabel

You just need to substitute your own user name and volumelabel.

"chown" stands for, "change owner."

"chmod" stands for, "change mode."

Each of the three digits represent the read, write, and execute permissions for the owner, group, and world. 

The first digit, 7, represents the binary digits 111 for read (true), write (true), and execute (true) permissions for the owner of the folder or file for which you are changing ownership.  1 represents true, and 0 represents false.  The number 7 is the sum of the place values of these binary digits:

read(1 x 22 = 4), write(1 x 21 = 2), execute(1 x 20 = 1),  4+2+1 = 7

The second digit, 5, represents the binary digits 101 for read (true), write (false), and execute (true) permissions for other members of the group to which the user belongs:

read(1 x 22 = 4), write(0 x 21 = 0), execute(1 x 20 = 1),  4+0+1 = 5

With 5 in the second digit, writing is prohibited to other members of the group, but they can read and execute.  The group permissions do not matter as much on the Pandora as on a multi-user system, since you are probably the only person who will be using your Pandora.

The third digit, also 5, represents the binary digits 101 for read (true), write (false), and execute (true) permissions for the rest of the world.

Another common permission pattern for non-executable documents is 644, which gives read and write permissions to the owner, read access to the group, and read access to the rest of the world.

For those who want privacy, a permission pattern of 700 would give read, write, and execute permissions to the owner and give no permissions to the group and no permissions to the rest of the world.

If you want to give everyone in the world read, write, and execute access, then you can use a permission pattern of 777.

There are alphabetic options to set these permissions, but I prefer using the numbers.  There are also some less commonly used numbers with the chmod command, but you can do a Google search for chmod to read about the less common options.

The, "user:user", specifies the user and then the group.  If the user name were different than the group, then you would specify something like, "user:group".  The group and user permission will initially be, "root:root", if you format the card in the ext2 format, which you can change to your user and group.
 
Last edited by a moderator:
I get a, "command not found," message when I try tune2fs on the Pandora.  I just did a search of the / with the, "find", program, and it came up empty.
 
It was vaguely related to getting SDL to work, I swear!!  :lol:

Anyway, thanks for all the help. Chmod is what I was trying initially and for some reason didn't give me any results (I tried 666 and 777).

The chown command, however, worked nicely. I'm not sure why it didn't come up while I was googling this file permission stuff.. I should've probably just looked harder.

Thanks again to everyone, and since _wb_ decided to split this into a new thread (thanks and sorry) I'll be sure to put it to good use :D (I'll also be sure to try and do some research before posting too, promise...)
 
Back
Top