element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum A File Server That Won't Share Shares
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 17 replies
  • Answers 11 answers
  • Subscribers 667 subscribers
  • Views 3268 views
  • Users 0 members are here
  • raspberry_pi
Related

A File Server That Won't Share Shares

oghma
oghma over 7 years ago

I've moved on from my first post "What Are The Basics?"

 

For context, my HW:

Raspberry Pi 3 B+ and a 16Gb mSD card with LITE imaged onto it

Pi-Desktop and a Kingston 480Gb mSATA

USB Keyboard/Mouse combo

10.1” TFT LCD Colour Monitor and a 20cm HDMI cable

 

For context, my environment::

Cat5e with RJ45 ports leading to a HP hub.

(Wi-Fi useless in my old house with thick walls. Not willing to spend a fortune with Wi-Fi extenders. Tried one - doesn't work well.)

What I've done:
used fstab to mount three partitions on the mSATA so they are there at bootup.
lines follow the format:

PARTUUID=5daf9610-09    /mnt/MYLABEL    vfat    defaults,auto,umask=000,users,rw 0 0

where 09 is either 01, 02 or 03 and MYLABEL are the three associated folders in /mnt that are my mountpoints.

 

When I issue a "mount" command I get:

/dev/sda9 on /mnt/MYLABEL type vfat (rw, nosuid,nodev,noexec,relatime,fmask=000,dmask=000,allow_utime=0022,codepage=437,iocharset=asci,shortname=mixed.errors=remount-ro)

where 9 is either 1, 2 or 3 and MYLABEL are the three associated folders in /mnt that are my mountpoints.

The options "nosuid, nodev and noexec" are unexpected, as I thought the opposite values are set by the "default" option.

 

I have confirmed that these mounts are owned by root.

 

I have updated the smb.conf with the following:

[global]

case sensitive = auto

preserve case = yes

short preserve case = yes

netbios name = Pi

server string = RaspFS01

workgroup = MYWKGRP

 

[MYSHARE9]

# share for the partition MYLABEL

path = /mnt/MYLABEL

comment = My sharing folders

browseable = yes

writeable = yes

only guest = no

create mask = 0777

directory mask = 0777

public=no

valid users = MYUSERS

force group = MYWKGRP

 

where 9 is 1, 2 or 3. MYLABEL is the same as the mountpoints above. MYUSERS is a comma seperated list of accounts I created including the user pi (See my next step). MYWKGRP is the workgroup I have on my PC.

 

I have set up users using "adduser" command

I have also made them members of the same groups as user pi

 

I have made the Pi boot with a static IP address and identified the static gateway and static_domain_name_servers as my BT Router.
Once rebooted I can ping google, so I'm still connected to the internet. I've also successfully run the update on the OS.
Now the fun!
When I try to create a mapping from my PC to the Pi, I get "Access Denied" no matter what user I use, even pi.
I ran the diagnostics from my PC and I can find the server, (although it does not show up in Networks). I even confirm the share exists. I just can't map to it.
I try to change the ownership of the mounts from root using the chmod command, but I get "Operation is not allowed". (Yes with sudo.)
I can't seem to allow any user to use these mounts remotely. I can only use them from the Pi! This is not a file server, but just a workstation. I can't find a way to associate MYWKGRP with these mounts with the right permissions.
I've seen a way to explicitly state a user and passwaord in the fstab file, but that would not syncronise with any change of password with the PC. (Not to mention the horrible hole in security!)
Can anyone tell me what I'm missing? Thanks for reading this far.
  • Sign in to reply
  • Cancel
Parents
  • shabaz
    0 shabaz over 7 years ago

    Hi Steven,

     

    Great that things have progressed. Regarding the current issue, I'm not sure of the answer, but there were some comments here that could be useful:

    https://www.raspberrypi.org/forums/viewtopic.php?t=40130

    One of the comments mentions changing the permissions and ownership (chmod and chgrp or chown) of the folders and content prior to doing the mount.

    Snippet from there:

    You have to create the folder with the user used to mount the partition. The mount will not overwrite this ownership and rights. Only the content of the mounted partition will use this rights

    Also on most modern linux distributions, the chown is for the root user so that's why you have the permission denied message

    So first unmount the partition, do the chown with sudo, do the chmod with sudo and do again the mount

     

     

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • shabaz
    0 shabaz over 7 years ago

    Hi Steven,

     

    Great that things have progressed. Regarding the current issue, I'm not sure of the answer, but there were some comments here that could be useful:

    https://www.raspberrypi.org/forums/viewtopic.php?t=40130

    One of the comments mentions changing the permissions and ownership (chmod and chgrp or chown) of the folders and content prior to doing the mount.

    Snippet from there:

    You have to create the folder with the user used to mount the partition. The mount will not overwrite this ownership and rights. Only the content of the mounted partition will use this rights

    Also on most modern linux distributions, the chown is for the root user so that's why you have the permission denied message

    So first unmount the partition, do the chown with sudo, do the chmod with sudo and do again the mount

     

     

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
  • 14rhb
    0 14rhb over 7 years ago in reply to shabaz

    Steven,

     

    Adding toshabaz useful link; they initially mention Samba - which is used for file sharing with Windows OS. On Linux-Linix you have the Network File System (NFS) which should help.

     

    Rod

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube