LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-29-2014, 09:55 PM   #1
DanielLienad
LQ Newbie
 
Registered: Dec 2014
Posts: 2

Rep: Reputation: Disabled
How to make a network folder show changes automatically from thrid party additions.


Imagine this: There are two Computers (A and B) and one Server. Computer-A has a Folder open on the Server. Computer-B makes a new File in the same Folder. Computer-A doesn't show any additions to the Folder until a refresh occurs, whether it be by re-entering the Folder or pressing F5 to refresh manually. (On both computers, it's either the Nautilus or Dolphin file managers running under Ubuntu/Debian.)

I would like for a change in a file(or directory) on the server to propagate to all computers opened to that path, like how having two file managers opened to the same directory on a local path will show changes immediately to one another. If I understand it right, it's because linux sends out a message that a change has occured and Nautilus or Dolphin refreshes it's sources accordenly. I would like for the same thing to happen from a mounted folder over a network.

I use Samba as a file sharing server, as-well-as mounting through ssh using sshfs directly. I tend to favor my script called "mount" that uses sshfs, as it's faster on first startup, and seems to be less prone to not working.
 
Old 12-30-2014, 08:07 PM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
I have to give you kudos for coming up with the general concept independently of the original RFC however what you're describing is called LDAP
If you're using SAMBA, you should probably check your config to make sure it's running with LDAP support.
 
Old 12-30-2014, 08:13 PM   #3
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,347

Rep: Reputation: Disabled
Quote:
Originally Posted by DanielLienad View Post
I would like for a change in a file(or directory) on the server to propagate to all computers opened to that path, like how having two file managers opened to the same directory on a local path will show changes immediately to one another.
The fact that you have to press F5 to see the changes is not an issue with the shared folder, it's a result of how the file manager works.

When a folder is viewed in a file manager, it's up to that program to decide if and how often it wants to refresh that view. It can do this by regularly polling the directory in question, or use inotify (the "message" you're referring to) if the file system is local.

A network file system is by definition not local, so the kernel is not automatically made aware of changes made by other clients on the network. That means inotify won't work (because it'll never be triggered), so you're left with polling to see if there's been any changes. If Nautilus or Dolphin can't be configured to do this automatically at certain intervals, there's not much you can do about it.

---------- Post added 31-12-14 at 03:14 ----------

Quote:
Originally Posted by dijetlo View Post
I have to give you kudos for coming up with the general concept independently of the original RFC however what you're describing is called LDAP
What does LDAP have to do with file system notifications?
 
Old 12-31-2014, 04:40 AM   #4
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
What does LDAP have to do with file system notifications?
Quote:
Protocol Overview...
In addition the server may send "Unsolicited Notifications" that are not responses to any request, e.g. before the connection is timed out.
LDAP attaches a "modified" flag and the client rescans the resource, or at least that's my understanding of the process (if you have a different understanding of it, please share).
 
Old 12-31-2014, 10:50 PM   #5
DanielLienad
LQ Newbie
 
Registered: Dec 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
So, I did some research into the inotify system and what LDAP is. In the process, I've added NFS to my little server just to play around with different methods.

It seems there's a few people out there with the same goal as myself but they seemed to have little success. The most interesting discovery I made was on a different forum that gave me a possible idea, which was to somehow get a communication going between the Server inotify system and the Nautilus file manager on the client side, but nfs doesn't support it and unfortunately samba looks to be the same.

As for LDAP, I'm having troubles getting its concept understood, but for all intents and purposes it appears to be a type of communication protocol, which lines up with what you said,
Quote:
LDAP attaches a "modified" flag and the client rescans the resource,
I will have to do more research and play around, because if your understanding of it is correct, that would be exactly what I want.

Just a side note on the inotify idea: There would have to be a script monitoring the Folder on the server side using the inotify_watch. In the event of a change, it would send a signal out to the client side where another program would artificially insert an event into the clients inotify system with an adjusted directory location, thus causing Nautilus to respond accordenly, being none the wiser... But, it feels to me to have the potential of having lots of hidden pit falls just to juryrig it, so I will do more research, especially on LDAP.

Last edited by DanielLienad; 01-02-2015 at 07:03 PM.
 
  


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
Automatically Map Network Folder with VPN Connection at Startup Bob Jones Ubuntu 0 05-28-2013 09:44 AM
make linux folder visible on windows network ? tonj Linux - Software 5 12-10-2009 04:40 PM
terminal shows folder but file browser does not show folder biharibong Debian 2 01-21-2009 12:58 PM
I deleted the Additions folder in Virtual Box. Ordinary12 Ubuntu 1 02-21-2008 07:04 PM
How to automatically move files from one folder into another folder? xmrkite Linux - Software 6 11-05-2006 10:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:36 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