User Tools

Site Tools


howto:sd_permissions

Writing to SD card without needing root permissions

Normally Xandros automounts all SD cards and USB storage devices under root. This means that you can't copy new files, edit files, and delete files on the removable storage unless you're using a root shell or using the File Manager (Administrator).

To change this so that you can edit your files without being root, open up /etc/udev/rules.d/50-xandros-udev.rules as root:

sudo kwrite /etc/udev/rules.d/50-xandros-udev.rules
  • Note: Following line isn't found on a Xepc upgrade

Look for this line:

BUS=="usb", KERNEL=="sd[!0-9]", NAME="%k", MODE="0660", GROUP="floppy", SYMLINK+="disks/Removable/%k", RUN+="/usr/bin/usbstorageapplet zip %k"

Change MODE to “0666” to allow all users to read and write:

BUS=="usb", KERNEL=="sd[!0-9]", NAME="%k", MODE="0666", GROUP="floppy", SYMLINK+="disks/Removable/%k", RUN+="/usr/bin/usbstorageapplet zip %k"

Or change MODE to “0777” to allow all users to read, write and execute:

BUS=="usb", KERNEL=="sd[!0-9]", NAME="%k", MODE="0777", GROUP="floppy", SYMLINK+="disks/Removable/%k", RUN+="/usr/bin/usbstorageapplet zip %k"

Save the file, and reload the udev rules:

sudo /sbin/udevstart

Now you should be able to write to your SD card/thumbdrives without needing to be root.

Setting permissions for other os, for example ubuntu, eeexubuntu, or suse

Open terminal.

type in

   cd .. 

until you are at your file system level, ie your cd .. just returns to where you are at.

Type in

   cd /media

Type in

   ls -l 

to see if your disk is there, usually labeled as disk. You will see something like:

  drwxr-xr-x 3 root root 4096 2008-01-20 09:53 disk

Now you will need to change premissions,

Type in

   sudo su 

and your password. Type in

   chown <your user name> <disk name>
   ie: chown user disk

Now type in

   ls -l 

and you should see the change.

   ie: drwxr-xr-x 3 user root 4096 2008-01-20 09:53 disk

now the user can read and write to the drive.


The OS says I do not have the permission to access /home/user/something

Something went wrong with my installation and I could no longer use any USB storage devices. I got the error mesage that I do not have the permission to access /home/user/<something> where <something> was a name that was different for every device I tried. It turned out that for some unknown reason the /media directory did not exist. Creating it solved the problem.

rio sosh code rio

howto/sd_permissions.txt · Last modified: 2012/01/28 09:49 by hello