USB Drives

chmod

ls -l /dev/disk/by-uuid/
chmod 0777 filename to give all access to it.

I was having problems accessing the USB disk which was NTFS. the above gave access for everyone to everything.

I currently use chmod 0777 (everything for everyone) and chmod 0775 (almost everyone). I guess this is very insecure, but my PI is on a private network with single login so I don’t mind. If your doing it for multi users then be careful these are not safe and secure.

Mount USB

/etc/fstab is where all the drive mount information goes. You have to do it by hand, its not really Plug-n-Play like windows.

sudo cp /etc/fstab /etc/fstab.backup
sudo nano /etc/fstab

2 good links for doing this

http://www.debianhelp.co.uk/fstab.htm
https://support.plex.tv/hc/en-us/articles/200288606-Mounting-NTFS-Drives-on-Linux

$ mkdir -p /mnt/myusb
$ mount -t ntfs -o rw,users /dev/sda1 /mnt/myusb
$ umount /mnt/myusb

fstab format

http://www.debianhelp.co.uk/fstab.htm

http://linuxcommando.blogspot.co.uk/2007/12/how-to-mount-usb-flash-drive-from.html

Remove directory

rm -rf example

Samba share

http://www.simonthepiman.com/how_to_setup_windows_file_server.php

Backup

http://www.aboutdebian.com/tar-backup.htm
http://www.tecmint.com/18-tar-command-examples-in-linux/

tar -cvpf /backups/fullbackup.tar –directory=/ –exclude=proc –exclude=sys –exclude=dev/pts –exclude=backups

more about backups, still no good solution apart from copying the disk each time with Win32DiskImager. Everything else is just to slow.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s