Solved

how do I create a Linux cifs share that points to a path alias or link

Posted on 2014-09-12
6
359 Views
Last Modified: 2014-09-29
I need to create a cifs share on Red Hat Linux 6.5 to connect to a Windows Server 2008R2 server.  I need the name on both sides to be 'dump'.  That part I can do, with the mount -t cifs etc.....

The part I need help with is on the Linux side where 'dump' will actually be a pointer to the path /saved/files.

I've tried creating a soft link pointing dump to /saved/files, then using dump in the cifs mount but that didn't work.  I tried setting up a mount point named dump and then using that in the cifs mount.  None of which I really knew in detail what I was doing or the impact it would have.  It was the shotgun approach based on the limited understanding I have of setting up mount points, links and cifs shares. But, at any rate, nothing I have tried has worked.

So, basically how do I set things up so that the Linux system can put files in a directory named 'dump' that points to /saved/files and have those files also show up on the Windows server in a share named 'dump'?

TIA

Roger
0
Comment
Question by:si-support
6 Comments
 
LVL 27

Accepted Solution

by:
Nopius earned 300 total points
ID: 40320779
Hi.

It's not very clear what do you mean by "name on both sides to be 'dump'".
It's easy to create cifs share (located on Linux ) to be visible in Windows as 'dump', just edit /etc/samba/smb.conf and add a section like:
[dump]
comment = Dump share
path = /saved/files
public = yes
writable = yes
printable = no

Open in new window


then restart samba service 'service smb restart'

Also it's easy to create symlink from any Linux directory with 'dump' name to point to /saved/files:

ln -s /saved/files dump

Open in new window


Also you can export NFS share and mount it as /dump on any other Linux system via NFS, just export it in /etc/exports and mount as /dump.

If you need something different, please clarify.

Regards,
Arty
0
 
LVL 21

Assisted Solution

by:Mazdajai
Mazdajai earned 175 total points
ID: 40320833
How about just mounting the windows share under redhat with cifs mount called /saved/files and create a symbolic link pointing to it? If you continue to have issues,post your mount commands or fstab.
0
 
LVL 21

Assisted Solution

by:Mazdajai
Mazdajai earned 175 total points
ID: 40320838
If your goal is to setup a shared file system between windows and Linux, all you need is one share, have clients mounted to it and call it whatever you need.  The quickest way is to setup on Windows side and mount from Linux with a cifs mount.
0
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

Author Comment

by:si-support
ID: 40323125
Thanks for the comments.  Noplus, I want to use a cifs share rather than Samba, so I tried setting that up in the order you recommended.  Here's what I did:

On the Windows box I created a folder named 'dump' and set it up as a shared folder.  I created a simple test file there.

On the Linux box I created a directory /dump and gave it 775 permissions and left it empty.

Working from the linux box, I ran these commands:

mount -t cifs -o username=xxxx,password=xxx,workgroup=ourdom //10.10.10.20/dump /saved/files.    That created the mount point /saved/files pointing to the Windows server directory named 'dump'.  

ln -s /saved/files dump .  I hoped that would link the directory /saved/files to the directory named 'dump' I created on the Linux side.  

ls dump  displayed a test file I created in the directory named 'dump' on the Windows share 'dump'.  NOT the files under the Linux directory /saved/files, which is what I'm trying to get to.

Here's what I need to do.  On the Linux side, a user goes to the 'directory' named 'dump' and sees the files/folders in /saved/files.  On the Windows side, a user goes to the shared directory named 'dump' and sees the same files from the Linux directory /saved/files. Neither the Linux user nor the Windows user needs to worry about accessing any directory other than the one named 'dump'.  Neither the Windows user nor the Linux user needs to be concerned with, or know about, the /saved/files directory.  As far as either is concerned, they just know 'dump' holds the files that need.

Hope that helps clarify things.
0
 
LVL 14

Assisted Solution

by:mikelfritz
mikelfritz earned 25 total points
ID: 40342934
It sounds like your ln command is backwards.

Try

ln -s /path_to_local_dump /saved/files
0
 

Author Closing Comment

by:si-support
ID: 40350154
The problem was not resolved, but points were awarded based on details included in solution and demonstrated understanding of my issue.
0

Featured Post

Don't lose your head updating email signatures!

Do your end users still have the wrong email signature? Do email signature updates bore you or fill you with a sense of dread? You can make this a whole lot easier on yourself by trusting an Exclaimer email signature management solution. Over 50 million users do...so should you!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now