LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-07-2015, 09:47 AM   #16
nix.noob
LQ Newbie
 
Registered: Aug 2013
Posts: 25

Original Poster
Rep: Reputation: Disabled

I tried reformatting as ext4 and added this line into /etc/fstab
Code:
/dev/sda1       /media/USBSSD   ext4    defaults          0       2
and then remounted as ext4 and set permissions of /media/USBSSD to 777, and that got me quite a way along the road.

Now, I've set up my samba user and have been able to make a connection to the share from a windows machine and have successfully written a file into the share.

I'm trying to do the same thing now from a (different) desktop linux machine (i.e. not the one that has the disk attached) and although I've had a go at mounting it, I dont have write permisisons.

From the desktop linux machine (linux mint, latest version) I copied an example from here (http://www.cyberciti.biz/tips/how-to...der-linux.html) and ran
Code:
sudo mount.cifs //nasmachine/share -o user=usr,pass=pwd,dom=WORKGROUP ~/Nas
I can see the contents, I just can't write to it.
I also tried
Code:
sudo mount -t ext4 //nasmachine/share -o username=usr,password=pwd ~/Nas
mount: special device //nasmachine/share does not exist
but that didnt work.

Btw, regarding needing to be root to change the permissions above, I think I was running chmod through sudo

Last edited by nix.noob; 02-07-2015 at 09:53 AM.
 
Old 02-07-2015, 10:04 AM   #17
nix.noob
LQ Newbie
 
Registered: Aug 2013
Posts: 25

Original Poster
Rep: Reputation: Disabled
I think in hindsight I will close this out as solved and ask a separate question for my currnet problem because I suspect it's samba related.
Thanks to everyone here, you've been great
 
Old 02-07-2015, 10:14 AM   #18
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,938

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Try using the IP address of the NAS?

Use
mount -t cifs //IP_NAS/share_name /mnt/point -o username=username

The linux file browser should also be able to connect to the share.
 
Old 02-07-2015, 10:38 AM   #19
nix.noob
LQ Newbie
 
Registered: Aug 2013
Posts: 25

Original Poster
Rep: Reputation: Disabled
If I connect using the URL with the IP address using the file browser nemo then once i'm prompted to enter the credentials of the samba user I set up, it does connect and I have readwrite permissions. Thank you!
If instead I use the hostname of the nas box, it says "could not display smb://machine/folder The location is not a folder". I can live with it just using the ip address.

But trying the command above to mount to my own mount point, I still get some permission denied issues.
It seems that through nemo I have full rw permissons. With the mount created on the cli, I have rw for files I created through nemo only. I have the permission to create a new empty file but not write to it.
echo "hello" > ./Nas/world.txt
Gives me a "Permission denied" error when writing to the file, but it does create the file first.
I supply the same credentials to the cli as I did to the file browser, so I'm not sure what's happening.
 
Old 02-07-2015, 11:28 AM   #20
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,938

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
There are few different mount options but umask=000 will work.

It takes a bit of work to configure linux to use cifs for name resolution. The easiest way is to add a line in your /etc/hosts file.
 
Old 02-07-2015, 12:33 PM   #21
nix.noob
LQ Newbie
 
Registered: Aug 2013
Posts: 25

Original Poster
Rep: Reputation: Disabled
I think I've read that umask doesn't work with cifs.

It's in a state now where I can use it at least, even if it's not quite as perfectly set up as I'd like. Thanks for your help.
 
Old 02-07-2015, 03:15 PM   #22
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,604

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Linux itself doesn't work that well with CIFS - the problem is getting the Windows logins correct (to access you have to use a Windows permission - thus I believe it has to be added to the mount... and only one person at a time). The second problem is that you are causing a double translation of access controls - from a Linux definition to a Windows definition (on the client), then from a Windows definition to Linux (on the server). It can be done - but it will also lose capabilities.
 
Old 02-07-2015, 03:37 PM   #23
nix.noob
LQ Newbie
 
Registered: Aug 2013
Posts: 25

Original Poster
Rep: Reputation: Disabled
Is there a better approach you could recommend?
Im just trying to set something up so that files can be read from (and written to) a centralised disk that's available to a bunch of over devices, including linux, windows, android.
 
Old 02-07-2015, 04:28 PM   #24
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,604

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
I export using NFSv4 for Linux systems, and Samba for Windows.

Linux can also use glusterfs (for speed), though I'm not so sure of using the same filesystem for Windows due to the way it works (it uses pools in files of another filesystem). But I suspect using btrfs for the filesystem will get most of the benefits without the limitations (but isn't quite as fast for I/O - glusterfs is designed for network I/O speed and provides extra buffering available).

If you are considering making a NAS system, there is always FreeNAS as a kit. I believe it has everything already setup, and makes site configuration easier. http://www.freenas.org/
 
Old 02-07-2015, 09:45 PM   #25
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,938

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
I'm not aware that a BSD port is available for the pi.

http://elinux.org/R-Pi_NAS
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to mount an external ntfs drive with full read/write permissions for everyone Da9L Linux - Newbie 10 12-03-2012 06:54 AM
Ubuntu 11.10 HELP NO longer have Read Write Permissions on external NTFS USB Drive rstoesser Ubuntu 1 10-25-2011 04:23 PM
Not able to set write permissions on external hard drive. jpen8560 Linux - Hardware 19 03-22-2006 11:44 AM
Write permissions for external hard drive kg4ysy Linux - Hardware 1 05-19-2005 06:36 AM
write permissions for a storage drive Riichard Linux - General 7 12-31-2003 03:30 AM


All times are GMT -5. The time now is 10:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration