LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 04-14-2016, 09:02 PM   #1
sniper8752
Member
 
Registered: Oct 2012
Posts: 564

Rep: Reputation: Disabled
accessing shared drive on rpi


I am trying to access a shared drive. Here is part of my samba configuration:

[pihome]
comment= Pi Home
path = /disk1/
browseable=Yes
available = yes
read only = no
writeable=Yes
only guest=no
create mask=0777
directory mask=0777
public=no

I am trying to access this from a Mac.
 
Old 04-15-2016, 05:09 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,848

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
and?
 
Old 04-18-2016, 04:41 PM   #3
sniper8752
Member
 
Registered: Oct 2012
Posts: 564

Original Poster
Rep: Reputation: Disabled
sorry...
it asks me to login when I try to paste a file onto the rpi share, and when I enter my local account information, it tells me that i "don't have permission to access some of the items."
 
Old 04-18-2016, 05:14 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
I would guess that you need to add a samba password:

sudo smbpasswd -a username
 
Old 04-19-2016, 10:10 AM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
If you are communicating with a Mac, then NFS would work better. Using Samba requires the Mac to translate its identification to a Windows form, and the Pi to translate that form back into its identification... and both the Mac and Pi already use the same methods.
 
Old 04-19-2016, 08:02 PM   #6
sniper8752
Member
 
Registered: Oct 2012
Posts: 564

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
I would guess that you need to add a samba password:

sudo smbpasswd -a username
So I did
Code:
sudo pdbedit -L -v
, showing the user, "pi". when I try to login on the mac, it shows my full name as the username. I reset the password, and tried the new password, and it rejects it. The only password it accepts is my Mac local user account, but then I get a "no permission" error message. I also tried "pi" as the username, and the new password, but that fails as well. I am trying to paste a item on the rpi.
 
Old 04-19-2016, 09:46 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
So lets try this again... From the finders go menu select connect to server.
Enter for the server address:
smb://Pi_IP_Address

A window should pop up requesting authentication. You should use Pi for the username and the smb password you created on the Pi previously. If that works you should see another window with a list of shares. Hopefully you should see the pihome share. Select ok and your in.

Another method to transfer files is scp of sftp. You need to start the ssh server on the pi. The command syntax is:
scp filename pi@IP_address:/disk1/filename
 
Old 04-21-2016, 07:45 PM   #8
sniper8752
Member
 
Registered: Oct 2012
Posts: 564

Original Poster
Rep: Reputation: Disabled
For the first method, I am able to login. I select the share, and it comes up. I paste the item, and I get a prompt saying "Finder wants to make changes. Type your password to allow this". The pi username/password does not work. When I use my local mac user account login, it accepts, but them tells me that I don't have permission to paste to the destination.
 
Old 04-21-2016, 07:53 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
What are the permissions on that directory.
ls -ld /disk1
 
Old 04-25-2016, 05:39 PM   #10
sniper8752
Member
 
Registered: Oct 2012
Posts: 564

Original Poster
Rep: Reputation: Disabled
Code:
drwxr-xr-x  16 root root  4096 Sep 13  2015 disk1
 
Old 04-25-2016, 06:23 PM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Maybe this will help. Changing permissions for user pi will should work.

http://www.raspberrypi-spy.co.uk/201...-raspberry-pi/
 
Old 04-25-2016, 08:33 PM   #12
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Actually, there several bugs in the example in that link.

1. The fstab entry shown does not have the filesystem type field filled in, which will cause the mount to fail.

2. the UID=/GID= options only work for non-Linux native filesystems (udf/fat/vfat/ntfs/iso9660). This COULD cause the mount to fail, but it is also possible the options get ignored.

Normally, the filesystem root remains owned by root. What is done instead is that any file shares start with a directory within the filesystem. That way the protection of "lost+found" is maintained as remote hosts cannot make improper modifications or access files they are not supposed to have access to.

Between Mac OSX and Linux, it is better to use NFS. Samba is designed to work with Windows systems.

Last edited by jpollard; 04-25-2016 at 08:34 PM.
 
Old 04-25-2016, 08:36 PM   #13
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Thanks...
 
Old 04-27-2016, 05:54 PM   #14
sniper8752
Member
 
Registered: Oct 2012
Posts: 564

Original Poster
Rep: Reputation: Disabled
so disk1 permissions looks like this:

Code:
drwxr-xr-x  16 pi   pi    4096 Sep 4  2015 disk1
Are these good permissions to have to restrict access?
 
Old 04-27-2016, 06:03 PM   #15
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Yes should be.
 
  


Reply



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
LXer: Mini-PC taps RPi Compute Module and supports RPi 2 LXer Syndicated Linux News 0 02-22-2015 03:03 PM
accessing windows shared folders mehnaz Linux - Newbie 22 08-03-2009 12:41 AM
accessing shared folders tannu_ah Linux - Newbie 1 05-02-2009 04:19 PM
Accessing Windows shared drive from command line michaelmalak Linux - Networking 2 11-10-2008 06:34 PM
Accessing shared directory in linux? Infernal211283 Linux - Newbie 2 12-11-2005 08:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:00 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
Open Source Consulting | Domain Registration