fishmong3r
Posts: 25
Joined: Wed Nov 05, 2014 1:35 pm

SD card access problem

Mon Dec 15, 2014 10:54 am

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?

cpc464
Posts: 239
Joined: Tue Jul 08, 2014 5:10 pm
Contact: Website

Re: SD card access problem

Mon Dec 15, 2014 4:50 pm

Try a chmod or chown on the mount point (with the USB file system mounted).
Unix engineer since 1989

RobHenry
Posts: 452
Joined: Fri Sep 21, 2012 9:04 pm
Location: UK

Re: SD card access problem

Mon Dec 15, 2014 4:56 pm

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.

fishmong3r
Posts: 25
Joined: Wed Nov 05, 2014 1:35 pm

Re: SD card access problem

Mon Dec 15, 2014 7:31 pm

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.

cpc464
Posts: 239
Joined: Tue Jul 08, 2014 5:10 pm
Contact: Website

Re: SD card access problem

Tue Dec 16, 2014 11:14 am

Let's see the permissions on your point point ("ls -ld /mount/point") and also the output of a simple "mount" command.

Jim
Unix engineer since 1989

fishmong3r
Posts: 25
Joined: Wed Nov 05, 2014 1:35 pm

Re: SD card access problem

Tue Dec 16, 2014 11:28 am

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)

User avatar
Jednorozec
Posts: 809
Joined: Sun Nov 24, 2013 2:17 pm
Location: Deposit, NY

Re: SD card access problem

Tue Dec 16, 2014 12:03 pm

chown -R pi:pi /media/torrent
The most important leg of a three legged stool is the one that's missing.
It's called thinking. Why don't you try it sometime?

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: SD card access problem

Tue Dec 16, 2014 12:20 pm

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.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

amankwah12
Posts: 2
Joined: Wed Dec 10, 2014 6:05 pm

Re: SD card access problem

Tue Dec 16, 2014 12:56 pm

Maybe if you just use a regular sd card or micro sd it will work. Or just try a regular usb

fishmong3r
Posts: 25
Joined: Wed Nov 05, 2014 1:35 pm

Re: SD card access problem

Tue Dec 16, 2014 3:36 pm

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?

DirkS
Posts: 10362
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: SD card access problem

Tue Dec 16, 2014 3:52 pm

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.

fishmong3r
Posts: 25
Joined: Wed Nov 05, 2014 1:35 pm

Re: SD card access problem

Tue Dec 16, 2014 5:47 pm

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.

Return to “General discussion”