[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 612
  • Last Modified:

How to write as a root to external storage

Hello Everyone,

Let me explain my situation. I have bought WD Storage 2TB, and i created user in it to connect from another server,

I have mounted it to my server,
//0.0.0.0/external /backup cifs username=xxx,password=xxxx 0 0  there is no problem..

The problem is files owner is not root, different numbers like 98 1000 or something..

How can i mount this external disk to write in it as a root. Because i need to write in it as a root.

Is there any suggestion?


0
ArneIT
Asked:
ArneIT
  • 3
  • 2
1 Solution
 
TRW-ConsultingCommented:
Where you have "username=xxx,password=xxxx", change that to "username=xxx,password=xxxx,uid=0,gid=0"

The problem with CIFS is that it's being logged into as a certain user (username/password), so all file/directory ownerships are actually by that username.  Adding the "uid=0,gid=0" option makes it appear as if the owner/group is root/root.

It would be much better if they had the option of using NFS, then you could have real multi-user ownership instead of the limits SMB puts on it.
0
 
ArneITAuthor Commented:
Hi TRW-Consulting,

Thanks for your help, and yes i can do that with NFS but how?
0
 
ArneITAuthor Commented:
I have tried to mount with NFS,
0.0.0.0:/shares/SRV9         /backup                 nfs     defaults        0 0

It didnt worked out, getting this error.

mount: 95.0.197.6:/shares/SRV9 failed, reason given by server: Permission denied

Can you help me what should i do on WD Storage Side?

thanks
0
 
TRW-ConsultingCommented:
Setting up NFS is a bit more complicated than SMB, and without seeing the administrative interface pages I couldn't say how your particular system does it.  But a general overview is that users/groups have to be set up, and shared locations defined as to what external sites have access to them and with what permissions.

If this is for personal use and not going to be accessed by more than 2 or 3 people/systems, I wouldn't bother with NFS and just use cifs (SMB).
0
 
ArneITAuthor Commented:
thanks
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now