SOLVED: Locally mounted Shares not showing any files

br0wnserver
Posts: 35
Joined: Sat Aug 09, 2014 9:28 am

SOLVED: Locally mounted Shares not showing any files

Postby br0wnserver » Sun Aug 10, 2014 7:46 am

So, I recently posted about getting all of my media over from my old hard drive (from WHS) to my new one (with A7) here viewtopic.php?f=16&t=5516 and I now have it all copied over. Greyhole has kicked in, and cleared out the LZ, so all of the files are on the drive, in their appropriate shares. I am able to access the shares from a W7 computer and I can play video files and view pictures from the W7 computer, so I know that permissions are set correctly.

I followed this guide https://wiki.amahi.org/index.php/Mount_Shares_Locally to mount the shares locally on the server. The mnt folder shows up, but when I navigate to the folder, there are no files. All the files are located at /var/hda/files/Movies, or the respective folder. I'm not sure if it was setup correctly, because this line

Code: Select all

yum install cifs-utils
results in:

Code: Select all

Loaded plugins: fastestmirror, langpacks, refresh-packagekit Loading mirror speeds from cached hostfile * fedora: mirror.fdcservers.net * updates: mirror.fdcservers.net Package cifs-utils-6.3-2.fc19.x86_64 already installed and latest version Nothing to do
and when I actually start the mount service, it asks me for the root password at each of the current directories, even though I am logged in as the SU, and have used chown to change the ownership of everything in samab and below to my username. I also made the .smb_credentials file correctly.

Like I said, if I log in with my username on another computer, I have only tried one with W7, the shares show up fine. I will mention that I have added a second user, that is having issues accessing the shares on W7, but it could just be coincidence because I originally had issues even getting my first user to connect properly.

Here are the permissions of the /mnt/samba folder

Code: Select all

[root@localhost samba]# ls -la total 52 drwxr-xr-x 13 rbrown root 4096 Aug 9 22:19 . drwxr-xr-x. 3 root root 4096 Aug 9 12:03 .. drwxr-xr-x 2 rbrown root 4096 Aug 9 22:19 Books drwxr-xr-x 2 rbrown root 4096 Aug 9 22:19 Docs drwxr-xr-x 2 rbrown root 4096 Aug 9 22:19 Movies drwxr-xr-x 2 rbrown root 4096 Aug 9 22:19 Music drwxr-xr-x 2 rbrown root 4096 Aug 9 22:19 Owncloud drwxr-xr-x 2 rbrown root 4096 Aug 9 22:19 Pictures drwxr-xr-x 2 rbrown root 4096 Aug 9 22:19 Public drwxr-xr-x 2 rbrown root 4096 Aug 9 22:19 rbrown drwxr-xr-x 2 rbrown root 4096 Aug 9 22:19 Software drwxr-xr-x 2 rbrown root 4096 Aug 9 22:19 TV drwxr-xr-x 2 rbrown root 4096 Aug 9 22:19 Videos

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Locally mounted Shares not showing any files

Postby bigfoot65 » Sun Aug 10, 2014 7:54 am

There potential issue here is most likely you missed something in the wiki guidance.

Double check that you followed the wiki guidance exactly for setting up mount_shares_locally. Any deviation could cause problems. The package you reference as already installed is fine. That's a precaution in case that package was not installed.

I recommend you stop the service. Next do the following:

Code: Select all

rm -rf /mnt/samba/*
This will clear out everything, then start the service.

If the issue still persists, then double check permissions. Something is not set up correctly obviously, so lets look at the obvious areas.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

br0wnserver
Posts: 35
Joined: Sat Aug 09, 2014 9:28 am

Re: Locally mounted Shares not showing any files

Postby br0wnserver » Sun Aug 10, 2014 8:11 am

Would the fact that it is asking me for a password for each share be a hint at an issue?

Code: Select all

[root@localhost rbrown]# service mount_shares_locally start Starting mount_shares_locally (via systemctl): Warning: Unit file of mount_shares_locally.service changed on disk, 'systemctl --system daemon-reload' recommended. Password for root@//127.0.0.1/Books: ************ Password for root@//127.0.0.1/Docs: ************ Password for root@//127.0.0.1/Movies: ************ Password for root@//127.0.0.1/Music: ************ Password for root@//127.0.0.1/Owncloud: ************ Password for root@//127.0.0.1/Pictures: ************ Password for root@//127.0.0.1/Public: ************ Password for root@//127.0.0.1/rbrown: ************ Password for root@//127.0.0.1/Software: ************ Password for root@//127.0.0.1/TV: ************ Password for root@//127.0.0.1/Videos: ************ [ OK ]
I stopped the service, ran the drive to remove the shares, and even went in a deleted the mount_shares_locally file. There was also a mount_shares_locally~ file that I deleted as well. I left the user created .smb_credentials file, because it is the same, but I used "less" to view the file and have this

Code: Select all

username:rbrown password:*****(password) domain=HOME
I ran through all of the commands again in the guide, and I still have the same result. It creates the files as root being the owner, but the problem still persists even after I change the owner from root to me.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Locally mounted Shares not showing any files

Postby bigfoot65 » Sun Aug 10, 2014 8:31 am

Is the domain correct?

There is something missing here. Did you change the user name in the init script? I.E. /etc/init.d/mount_shares_locally
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

br0wnserver
Posts: 35
Joined: Sat Aug 09, 2014 9:28 am

Re: Locally mounted Shares not showing any files

Postby br0wnserver » Sun Aug 10, 2014 8:43 am

Is the domain correct?

There is something missing here. Did you change the user name in the init script? I.E. /etc/init.d/mount_shares_locally
Should this be WORKSPACE?

I figured there was something off about that line because nothing I have on my network uses "HOME" but I just figured it was needed from anther file as HOME because it doesn't mention changing the domain.

EDIT: I just tried it using WORKSPACE instead of home and it still does not work. It still asks for my root password for each share.

This is my mount_shares_locally file

Code: Select all

#!/bin/sh # ### BEGIN INIT INFO # Provides: mount_shares_locally # Required-Start: $network $local_fs $remote_fs smb mysqld # Required-Stop: $network $local_fs $remote_fs smb # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: mount Samba shares locally ### END INIT INFO username="rbrown"; if [ -f /etc/rc.d/init.d/functions ]; then . /etc/rc.d/init.d/functions fi start () { uid=`id -u $username` gid=`id -g $username` echo -n $"Mounting Samba shares locally: " mkdir -p /mnt/samba/ cd /mnt/samba/ mysql -u root -phda -e "select name from shares" hda_production | grep -v "^name$" | xargs -d "\n" mkdir -p sleep 10 ls -1 | while read d; do /sbin/mount.cifs "//127.0.0.1/$d" "$d" -o credentials=/home/${username}/.smb_credentials,uid=${uid},gid=${gid},file_mode=0660,dir_mode=0770,nobrl,hard,_netdev,iocharset=utf8,noserverino,mfsymlinks done touch /var/lock/subsys/mount_shares_locally success $"$base startup" echo return 0 } stop () { echo -n $"Unmounting locally mounted Samba shares: " /bin/umount -l /mnt/samba/* rm -f /var/lock/subsys/mount_shares_locally success $"$base shutdown" echo return 0 } restart () { stop start } case "$1" in start) start ;; stop) stop ;; restart) restart ;; *) echo $"Usage: $0 {start|stop|restart}" exit 1 ;; esac exit $?

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Locally mounted Shares not showing any files

Postby bigfoot65 » Sun Aug 10, 2014 9:20 am

The WORKGROUP should be whatever your domain is for most cases. Ensure the Domain = the domain you used when you created the HDA, the one in your amahi.org HDA profile.

Did you put the .smb_credentials file in your admin user Home directory?
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

br0wnserver
Posts: 35
Joined: Sat Aug 09, 2014 9:28 am

Re: Locally mounted Shares not showing any files

Postby br0wnserver » Sun Aug 10, 2014 9:29 am

Ok, that wasn't clear in the guide so I went ahead and edited it. Still, no avail. Just to be clear, is it supposed to be asking for my root password for every share?

And yes, the .smb_credentials file is in /home/rbrown which was the username setup in the Fedora install and is listed in the HDA setup page as an administrator.

Could this have anything to do with the fact that DHCP is turned off? I had issues getting DHCP to work, when I turned it off on my router non of the computers could access the internet, and when the server would restart, it wouldn't grab any ip becuause the DHCP for the router was off.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Locally mounted Shares not showing any files

Postby bigfoot65 » Sun Aug 10, 2014 9:33 am

No, the root password should never be needed. Something is wrong somewhere, just not sure the where.

Can you post the permissions for .smb_credentials?

Code: Select all

ls -al .smb_credentials
Also I presume the user name/password combination is the same one you use to log into the dashboard, correct?

UPDATE:
Warning: Unit file of mount_shares_locally.service changed on disk, 'systemctl --system daemon-reload' recommended.
Did you do

Code: Select all

systemctl --system daemon-reload
before starting the service again? If not, recommend you stop it, do that, then start the service. Sometimes it gets in a bad state and that is required to fix it.

You also indicated the shares and all files within are owned by rbrown:users, correct?
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

br0wnserver
Posts: 35
Joined: Sat Aug 09, 2014 9:28 am

Re: Locally mounted Shares not showing any files

Postby br0wnserver » Sun Aug 10, 2014 9:37 am

Code: Select all

[root@localhost rbrown]# ls -al .smb_credentials -rw-r--r-- 1 rbrown root 51 Aug 10 12:24 .smb_credentials
And I had tried that on one install, I will go ahead and try to stop it and redo that.

And yes, rbrown is the same login to the HDA dash.

Ran that command, same thing, asking for root password.

And when it creates the files /mnt/samba is created under root:root. I use

Code: Select all

chown -R rbrown /mnt/samba
to make it owned by me.
Last edited by br0wnserver on Sun Aug 10, 2014 9:46 am, edited 1 time in total.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Locally mounted Shares not showing any files

Postby bigfoot65 » Sun Aug 10, 2014 9:45 am

Change the permissions on that file to:

Code: Select all

chown rbrown:users .smb_credentials
Then try stopping the service, remove the /mnt/samba/*, then start the service.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 19 guests