LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-02-2019, 09:08 AM   #1
lelunicu
Member
 
Registered: Jun 2019
Posts: 105

Rep: Reputation: 0
cifs


hi,
in /etc/fstab i have


//10.140.50.183/test /y cifs rw,credentials=/etc/pwcifs,mapchars, uid=test,gid=test,dir_mode=0750,file_mode=0640,_netdev,vers=1.0

I like to know what is the command line equivalent to this entry in /etc/fstab.

is
mount -t cifs -o username=test,password=<passwd>
 
Old 09-02-2019, 09:56 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by lelunicu View Post
hi,
in /etc/fstab i have


//10.140.50.183/test /y cifs rw,credentials=/etc/pwcifs,mapchars, uid=test,gid=test,dir_mode=0750,file_mode=0640,_netdev,vers=1.0

I like to know what is the command line equivalent to this entry in /etc/fstab.

is
mount -t cifs -o username=test,password=<passwd>
Code:
mount -t cifs -o rw,credentials=/etc/pwcifs,mapchars,uid=test,gid=test,dir_mode=0750,file_mode=0640,_netdev,vers=1.0 //10.140.50.183/test /y
I am not sure if _netdev makes much sense for a manual mount. It can probably be left out.
 
Old 09-02-2019, 11:15 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
if it was put in /etc/fstab you only need to enter:
Code:
mount /y
if you want to know the command without that fstab entry see the previous post.
 
Old 09-03-2019, 05:36 AM   #4
lelunicu
Member
 
Registered: Jun 2019
Posts: 105

Original Poster
Rep: Reputation: 0
hi,
this mean that /y will be owned by uid=test,gid=test and the directory and file mode is dir_mode=0750,file_mode=0640?
 
Old 09-03-2019, 07:27 AM   #5
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Ability to find and read documentation is a fundamental skill of anybody working in IT. In the spirit of "teaching how to fish", let's have a look at the manual page.
Code:
uid=arg
   sets the uid that will own all files on the mounted filesystem.
...
gid=arg
    sets the gid that will own all files on the mounted filesystem.
...
file_mode=arg
    If the server does not support the CIFS Unix extensions,
    this overrides the default file mode.
...
dir_mode=arg
    If the server does not support the CIFS Unix extensions,
    this overrides the default mode for directories.
So yes, /y and all files under it will be owned by uid/gid. File and directory modes may or may not be determined by file_mode and dir_mode, respectively, depending on the file server.
 
Old 09-04-2019, 03:11 AM   #6
lelunicu
Member
 
Registered: Jun 2019
Posts: 105

Original Poster
Rep: Reputation: 0
hi,
it is my mistake to ask this question-i was a bit lazy-i know to search in documentation.maybe you thought i am a beginner-this is not the case.i seen the resuilt immediately after i asked this question.here is no possibility to delete a question.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cifs "mount error 13 = Permission denied" CIFS SUCKS humbletech99 Linux - Networking 45 04-06-2020 05:31 AM
manual mount cifs works but srcipt mount cifs has mount error (13): Permission denied CADIT Linux - Newbie 6 11-20-2009 02:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:11 PM.

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