Page 1 of 1

SD card access problem

Posted: Mon Dec 15, 2014 10:54 am
by fishmong3r
So I attached a microSD card to the USB port (microSD to USB adapter). The card contains data, it has NTFS filesystem.
My issue is I want it to be used by Deluge to download torrent to it. I can't do it as I get permission issue in deluge.
Also I can only copy anything to my card if I sudo it.
cp file /mycard/ --permission denied
sudo cp file /mycard/ --OK

How can I change the permission so that I could copy without admin elevation and also use Deluge?

Re: SD card access problem

Posted: Mon Dec 15, 2014 4:50 pm
by cpc464
Try a chmod or chown on the mount point (with the USB file system mounted).

Re: SD card access problem

Posted: Mon Dec 15, 2014 4:56 pm
by RobHenry
To use ntfs rw you need to install ntfs-3g, however it is atrocious and you would be better off with a native file system such as ext4.

Google raspberry pi (or linux) + ntfs.

Re: SD card access problem

Posted: Mon Dec 15, 2014 7:31 pm
by fishmong3r
RobHenry wrote:To use ntfs rw you need to install ntfs-3g, however it is atrocious and you would be better off with a native file system such as ext4.

Google raspberry pi (or linux) + ntfs.
I have ntfs-3g, I'm using many ntfs pendrives/SD cards, but the issue is only with this one.
Also tried chown.

Re: SD card access problem

Posted: Tue Dec 16, 2014 11:14 am
by cpc464
Let's see the permissions on your point point ("ls -ld /mount/point") and also the output of a simple "mount" command.

Jim

Re: SD card access problem

Posted: Tue Dec 16, 2014 11:28 am
by fishmong3r
cpc464 wrote:...
permissions:
pi@raspberrypi ~ $ ls -ld /media/torrent/
drwxr-xr-x 19 root root 32768 Jan 1 1970 /media/torrent/
mount:
pi@raspberrypi ~ $ mount
/dev/root on / type ext4 (rw,noatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=219764k,nr_inodes=54941,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=44788k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=89560k)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /media/torrent type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)

Re: SD card access problem

Posted: Tue Dec 16, 2014 12:03 pm
by Jednorozec
chown -R pi:pi /media/torrent

Re: SD card access problem

Posted: Tue Dec 16, 2014 12:20 pm
by DougieLawson
Jednorozec wrote:chown -R pi:pi /media/torrent
That won't work because the drive is FAT not ext4.
You need to set the ownership on the mount command or in /etc/fstab.

Re: SD card access problem

Posted: Tue Dec 16, 2014 12:56 pm
by amankwah12
Maybe if you just use a regular sd card or micro sd it will work. Or just try a regular usb

Re: SD card access problem

Posted: Tue Dec 16, 2014 3:36 pm
by fishmong3r
DougieLawson wrote:
Jednorozec wrote:chown -R pi:pi /media/torrent
That won't work because the drive is FAT not ext4.
You need to set the ownership on the mount command or in /etc/fstab.
So how to properly add the entry to /etc/fstab?

Re: SD card access problem

Posted: Tue Dec 16, 2014 3:52 pm
by DirkS
fishmong3r wrote:
DougieLawson wrote:
Jednorozec wrote:chown -R pi:pi /media/torrent
That won't work because the drive is FAT not ext4.
You need to set the ownership on the mount command or in /etc/fstab.
So how to properly add the entry to /etc/fstab?

Code: Select all

/dev/sda1       /media/torrent vfat       auto,user,rw,uid=pi,gid=pi   0  0
or use UUID (you can find it with command 'blkid', replace XXXX-XXXX with the output from this command):

Code: Select all

UUID=XXXX-XXXX /media/torrent  vfat       auto,user,rw,uid=pi,gid=pi   0  0
Gr.
Dirk.

Re: SD card access problem

Posted: Tue Dec 16, 2014 5:47 pm
by fishmong3r
DirkS wrote:...
Thank you very much DirkS. Now it's working. Apparently the issue was that I put that line into /etc/fstab and used ntfs drives so far, and now that this is fat the issue unveiled.