Files not available on Samba/Greyhole - only directories

arnonm
Posts: 3
Joined: Mon Apr 09, 2012 1:09 pm

Files not available on Samba/Greyhole - only directories

Postby arnonm » Tue Jul 10, 2012 5:51 pm

I can only see the directories on my Samba shares, not the files.
I had a failing primary disk and just replaced it. To replace it, I created the same structure on a new disk, copied over everyting with "cp -a", fixed the boot and swapped disks. But I have no idea if this caused the issue

Samba and Greyhole are working fine, but files are not displayed in local samba share or remote shares.
Any ideas
[/etc/greyhole.conf]
# This file is automatically generated by Amahi on Sun Jul 08 08:53:43 +0100 2012
# Any manual changes WILL BE OVERWRITTEN!
# Set the defaults (carefully) in /var/hda/platform/html/config/greyhole.yml
db_engine = mysql
db_host = localhost
db_user = greyhole
db_pass = greyhole
db_name = greyhole
balance_modified_files = false
email_to = root
greyhole_log_file = /var/log/greyhole.log
log_level = DEBUG
log_memory_usage = false
dir_selection_algorithm = most_available_space
df_cache_time = 15
delete_moves_to_attic = true
# sticky_files and stick_into options are nested - see http://wiki.amahi.org/index.php/Greyhol ... ed_options
sticky_files = Music/
sticky_files = Pictures/
# add any group of other settings
# here in multiple lines
storage_pool_directory = /var/hda/files/drives/drive1/gh, min_free: 10gb
storage_pool_directory = /var/hda/files/drives/drive0/gh, min_free: 10gb

[smb.conf]
# This file is automatically generated for WORKGROUP setup.
# Any manual changes MAY BE OVERWRITTEN
# Amahi configuration, generated on Wed Jul 11 00:57:35 +0100 2012
[global]
workgroup = WORKGROUP
server string = home.com
netbios name = hda
printing = cups
printcap name = cups
load printers = yes
cups options = raw
log file = /var/log/samba/%m.log
log level = 0
max log size = 150
socket options = TCP_NODELAY
preferred master = yes
os level = 60
time server = yes
unix extensions = no
wide links = yes
veto files = /*.nws/riched20.dll/*.{*}/
security = user
username map script = /usr/share/hda-platform/hda-usermap
large readwrite = yes
encrypt passwords = yes
dos charset = CP850
unix charset = UTF8
display charset = LOCALE
guest account = nobody
map to guest = Bad User
wins support = yes
printer admin = root, @ntadmin, administrator
follow symlinks = yes

.....
[Public]
comment = Public
path = /var/hda/files/Public
writeable = yes
browseable = yes
create mask = 0775
force create mode = 0664
directory mask = 0775
force directory mode = 0775
vfs objects = recycle
dfree command = /usr/bin/greyhole-dfree
vfs objects = greyhole

Directory of public as an example
=========================
Local samba mounts mounted to /mnt/samba using
/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

username=arnon
uid=500
gid=100

[ls -ltra /mnt/samba/Public/] - showing only files and directory sized are 0
total 4
drwxrwx--- 1 arnon users 0 May 6 17:50 Software
drwxr-xr-x 11 root root 4096 Jul 11 01:03 ..
drwxrwx--- 0 arnon users 0 Jul 11 01:18 My Money Backup
drwxrwx--- 1 arnon users 0 Jul 11 01:18 .
drwxrwx--- 0 arnon users 0 Jul 11 01:18 Divorce Documents
drwxrwx--- 0 arnon users 0 Jul 11 01:18 Documentation Vault


[ls -ltra /var/hda/files/Public/] - shows two files as well. They are owned by root but permissions are 777
total 24
drwxr-xr-x 10 arnon users 4096 May 6 17:50 Software
drwxr-xr-x 15 transmission users 4096 Jul 11 00:28 ..
drwxrwxrwx 2 arnon 504 4096 Jul 11 01:18 My Money Backup
lrwxrwxrwx 1 root root 53 Jul 11 01:18 amazonS3RR.php -> /var/hda/files/drives/drive1/gh/Public/amazonS3RR.php
lrwxrwxrwx 1 root root 46 Jul 11 01:18 php.ini -> /var/hda/files/drives/drive1/gh/Public/php.ini
drwxrwxr-x 6 arnon 504 4096 Jul 11 01:18 .
drwxr-xr-x 2 arnon 504 4096 Jul 11 01:18 Divorce Documents
drwxrwxrwx 3 arnon 504 4096 Jul 11 01:18 Documentation Vault

[ls -ltra /var/hda/files/drives/drive1/gh/Public/] - listing of gh directory shows they are owned by arnon with rw to group
total 108
-rwxrw-r-- 1 arnon users 4612 May 16 21:14 php.ini
-rwxrw-r-- 1 arnon users 76277 May 16 21:15 amazonS3RR.php
drwxr-xr-x 9 root root 4096 Jul 8 09:41 ..
drwxrwxrwx 2 arnon 504 4096 Jul 11 01:18 My Money Backup
drwxr-xr-x 2 arnon 504 4096 Jul 11 01:18 Divorce Documents
drwxrwxrwx 3 arnon 504 4096 Jul 11 01:18 Documentation Vault
drwxrwxrwx 6 arnon 504 4096 Jul 11 01:18 .
drwxr-xr-x 8 arnon users 4096 Jul 11 01:36 Software

arnonm
Posts: 3
Joined: Mon Apr 09, 2012 1:09 pm

[RESOLVED] Files not available on Samba/Greyhole - only dir

Postby arnonm » Wed Jul 11, 2012 1:04 am

found the answer. Problem was permissions on the /var/hda/files/drives level
found out that apache couldn't access the files. Set to 777 and everything started working.

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

Re: Files not available on Samba/Greyhole - only directories

Postby bigfoot65 » Wed Jul 11, 2012 4:42 am

That is correct. Looking at your output of /var/hda/files, they were off as are some of the ownership permissions.

All shares should be set to 775 and owned by your firstuser:users.
ßîgƒσστ65
Applications Manager

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

breinholt
Posts: 2
Joined: Wed Aug 13, 2014 7:58 pm

Re: Files not available on Samba/Greyhole - only directories

Postby breinholt » Wed Aug 13, 2014 8:03 pm

I have the same issue, but correcting the permissions does not fix it. The shares and files are available when the file is not part of the drive pool. As soon as the share is changed to use the drive pool the shares are listed, but they cannot be accessed.

Strangely enough the files and sub folders are available using the Android App. Strange that the Amahi Anywhere server has different permissions/accessibility than Samba would.

edit:
Same thing with media server; files are available for streaming.

File system is NTFS, but fstab mounts uid=(my first admin) and gid=users
I thought the issue may be related to this post:
http://askubuntu.com/questions/350580/r ... s-not-work
but alas it is not.

edit:
it appears to be related to the /etc/samba/smb.conf line vfs objects = greyhole with that commented out (and restarting the samba server) the files appear as expected.

Does amahi have a special version of samba?

Code: Select all

[root@localhost files]# uname -r; rpm -q samba amahi-greyhole 3.10.5-201.fc19.x86_64 samba-4.0.19-1.fc19.x86_64 amahi-greyhole-0.9.60-2.x86_64
It appears someone has identified the problem in this thread:
http://ubuntuforums.org/showthread.php?t=1966928&page=3
The problem was that he installed Greyhole on 11.10, and that installed the Greyhole VFS for Samba 3.5. When he upgraded to 12.04 (and thus Samba 3.6), Greyhole didn't update, and he was left with a Samba 3.5 VFS. HE switched that VFS for the Samba 3.6 one and it fixed his problems.

I should probably have the Greyhole daemon check for those incompatibilities, and fix them by itself.
but no solution on how to proceed is given. Anyone know what I need to do from here?

breinholt
Posts: 2
Joined: Wed Aug 13, 2014 7:58 pm

Re: Files not available on Samba/Greyhole - only directories

Postby breinholt » Wed Aug 13, 2014 11:06 pm

Ok I got it. I was in deed an out of date VFS

1.Download the latest release https://github.com/gboudreau/Greyhole/releases

Code: Select all

wget https://github.com/gboudreau/Greyhole/releases/download/0.9.60/greyhole-0.9.60.tar.gz
2.Unarchive the tar file

Code: Select all

tar zxf greyhole-*.tar.gz
3.find the appropriate .so file given your Samba version and processor architecture. Mine was Samba 4.0 and I run a standard 64 bit processor. (greyhole-*/samba-module/bin/4.0/greyhole-x86_64.so)
4.backup the existing .so (should something not work out right - like the current one is working, right) - Note this is for the x86_64 architecture:

Code: Select all

cp /usr/lib64/samba/vfs/greyhole.so /usr/lib64/samba/vfs/greyhole.so.backup
5.replace VFS with new

Code: Select all

cp greyhole-*/samba-module/bin/4.0/greyhole-x86_64.so /usr/lib64/samba/vfs/greyhole.so
I executed all these as root. I dont know if that is necessary or not (probably).

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

Re: Files not available on Samba/Greyhole - only directories

Postby bigfoot65 » Thu Aug 14, 2014 2:35 am

You should never use the files from the Greyhole web site. We package it separately for Amahi. The best approach is to do:

Code: Select all

yum clean metadata yum update amahi-greyhole
In this case, if the .so file replacement fixed your issue, you should be ok. In future, recommend you use the Amahi package. Otherwise you may break Greyhole on your HDA.
ßî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 53 guests