Solved

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

Posted on 2014-09-12
6
426 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

696 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