Skip to content

[Question] 3D Slicing Software Cura doesn't have permissions to save to SD card in USB adapter

I'm trying to move over to Linux for everything. As such, I'm trying to run Cura and save the sliced files to my SD card. Cura tells me I can't save to the SD card because of permissions. This was my first time mounting a USB stick, but I followed the wiki for both root access and user access. Neither worked, same issue. I tried running Cura with sudo from teeminal. I tried in Rofi. Idk. Can't figure it out.

I'm going to try saving to a local directory and mv it to the SD card, but that's a bandaid to this issue. Asking here first before /r/Cura because it could be a me and Linux issue, not a Cura issue.

Thank you.

21 points12 comments
Open on Reddit
About this post
Posted
Archived
Score
21 · 100% up
Kind
Text
ID
cusnbf

Author

33
posts
360
comments
5
media
View profile

12 comments

How did you mount the USB stick? What command did you use?

After you've mounted it, how does ls -ld /mnt look like, where /mnt is the place you've mounted the stick?

1 points
YT__OP2 hidden

Sudo mount /Dev/sdd1 /mnt/sdcard

Sudo mount -o gid=users,fmask=113,dmask=002 /dev/sdd1 /mnt/sdcard

Both allowed me to access the sdcard. Just couldn't write to it from Cura. As I said, I'm going to try to mv a file to it and see how that works.

1 points

I think you need to set mount uid option too. I personally use this alias:

alias mountusb="sudo mount --options utf8,uid=$UID,nodev,nosuid"

Then I just do mountusb /dev/sdd1 /mnt to mount something. utf8 means it properly reads unicode characters, uid sets the owner of the USB stick (which would be me), and nodev with nosuid are a security thing that prevent special block device files and SUID flags on files, basically preventing privelege escalation or other messups.

6 points

Whenever I want to mount something where I can access it as my user I would use something like udisksctl mount -b /dev/sdb1 to mount it for the current user (udisksctl is provided by the package udisks2). If the filesystem on the drive is FAT or NTFS, you should be able to not have to fiddle with file/directory permissions on the mounted drive. But if it is using ext4 or btrfs, you may have to change directory/file permissions on the mounted drive with chmod/chown.

1 points

I gotcha. I did read that there were utils for it, but it doesn't seem like much to do it myself.

Also, thank you. I didn't see anything on the filesystem format before so I'll pay attention to that when I try again later.

1 points

This doesn't really solve your problem per se, but I've always saved the gcode file somewhere to my hard drive and then copied it over with a file manager. I think it's supposed to be safer in that you are more sure that some weird issue won't interrupt the thread writing the file to disk in removable media, and you'll think it is complete. Whereas a file manager will fault if it can't or doesn't copy the whole file. You should still make sure to either run "sync" or use your disto's properly remove the device to ensure the whole file gets flushed to the disk, I've had that bite me before.

1 points

Yah, it probably wouldn't be a bad idea to do that, I just thought I'd avoid having all the gcode saved on my computer. I just need to get better about making sure all the names are the same of parts and gcode so it's easy to identify.

I was going go run sync, but since it didn't write, I didn't bother. I will when I try again later. Thank you.

1 points

Is your SD card lock on?

1 points

No lock. Saw a post about that and checked. It's a microsd that came with the card. There was also still space on the card, as I moved to windows and was able to use it just fine.

1 points

I always use udisks2 (with udiskie for automounting) for removable media, then I don't need root for mounting.

1 points

Someone else has also mentioned that. I'll be sure to take a look when I sit down next. Thank you.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.