Solved

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

Posted on 2014-09-12
6
349 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:si-support
Comment Utility
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
Comment Utility
It sounds like your ln command is backwards.

Try

ln -s /path_to_local_dump /saved/files
0
 

Author Closing Comment

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

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
OfficeMate Freezes on login or does not load after login credentials are input.
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

771 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

7 Experts available now in Live!

Get 1:1 Help Now