LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-10-2020, 05:10 PM   #1
bruceam
Member
 
Registered: Nov 2008
Location: Atlanta, Georiga
Distribution: Debian, Ubuntu
Posts: 88

Rep: Reputation: 17
Problem Accessing Network Shares within Debian 10.3


I recently upgraded from Debian 9.x to Debian 10.3. Once installed, I discovered that I could no longer mount the network drives to my computer as I had in Debian 9.xx. I was finally able to mount the drives by including the "vers=3\.0" parameter/option in the mount command. Now I can mount and read the contents of the shares, but I cannot write to them. "ls -all" says everything is owned by root. I tried chown (as root) to change the ownership to my user account, which was apparently successful. Unfortunately, when I checked everything was still listed as belonging to root. The chown command had no positive effect.

What is going on, and how do I get Debian 10.3 back to the functional level that I had with Debian 9.xx?

Thank you everyone who assists!


brucem
 
Old 04-10-2020, 08:53 PM   #2
berndbausch
LQ Guru
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 5,021

Rep: Reputation: 1504Reputation: 1504Reputation: 1504Reputation: 1504Reputation: 1504Reputation: 1504Reputation: 1504Reputation: 1504Reputation: 1504Reputation: 1504Reputation: 1504
Can you share the commands and their output?
I.e. mount, ls before and after the chown, and the command(s) you use to write to the shares.
 
1 members found this post helpful.
Old 04-11-2020, 01:30 AM   #3
bruceam
Member
 
Registered: Nov 2008
Location: Atlanta, Georiga
Distribution: Debian, Ubuntu
Posts: 88

Original Poster
Rep: Reputation: 17
Berndbausch,

The command I use is inside of a shell file is shown later on. Prior to execution of the mount command (shown below) the mount point directory (mntpoint) looks like this:


------------------------------------------------
Code:
abc@PC01:~/mntpoint$ ls -all
total 8
drwxr-xr-x  2 abc abc 4096 Apr  6 00:59 .
drwxr-xr-x 21 abc abc 4096 Apr  9 17:55 ..
abc@PC01:~/mntpoint$
------------------------------------------------


The mount command (shown below) is executed, via sudo

Code:
#==================================================================================================
#
mount -t cifs -o username=xxxxxx,password=yyyyyy,rw //192.168.xxx.xxx/SHARE /home/abc/mntpoint
#
#==================================================================================================
where xxxxxxx and yyyyyy are the username and password that successfully accessed the share drive when I was using Debian 9.xx .
Following execution of the mount command, the mount point directory looks like this:

---------------------------------------------------------------------------------------------------
Code:
abc@PC01:~/mntpoint$ ls -all
total 1516
drwxr-xr-x  2 root    root          0 Mar 31 01:40  .
drwxr-xr-x 21 abc     abc        4096 Apr  9 17:55  ..
drwxr-xr-x  2 root    root          0 Jul 18  2019  Appliances
drwxr-xr-x  2 root    root          0 Jul 14  2019  Applications
drwxr-xr-x  2 root    root          0 Jun 11  2019  Backup
drwxr-xr-x  2 root    root          0 Mar 27 00:28  Bills
drwxr-xr-x  2 root    root          0 Jul 18  2019 'Bookmarks and Addressbooks'
drwxr-xr-x  2 root    root          0 Mar 22 16:55  Computers
drwxr-xr-x  2 root    root          0 Mar 18  2019  Concur
drwxr-xr-x  2 root    root          0 Feb  2 21:57  Databases
drwxr-xr-x  2 root    root          0 Mar 31 01:38  Datasheets
drwxr-xr-x  2 root    root          0 Feb  2 21:57  DirSyncPro
drwxr-xr-x  2 root    root          0 Mar 22 17:10  Docs
drwxr-xr-x  2 root    root          0 Jul 18  2019  Docs2
drwxr-xr-x  2 root    root          0 Mar 30 20:37  Drawings
drwxr-xr-x  2 root    root          0 Jul 27  2019  Drivers
drwxr-xr-x  2 root    root          0 Jul 18  2019  DSP
drwxr-xr-x  2 root    root          0 Jul 18  2019  Images
drwxr-xr-x  2 root    root          0 Jul 18  2019 'E-Mail Data'
drwxr-xr-x  2 root    root          0 Aug 19  2018  Equipment
drwxr-xr-x  2 root    root          0 Jul 18  2019 'Family Data'
drwxr-xr-x  2 root    root          0 Mar 31 01:38  Filesync
drwxr-xr-x  2 root    root          0 Nov 12  2018  FreeFileSync
drwxr-xr-x  2 root    root          0 Jan 12  2019 'G13 Profiles'
drwxr-xr-x  2 root    root          0 Mar 22 17:07  Games
drwxr-xr-x  2 root    root          0 Jul 18  2019  Graphics
drwxr-xr-x  2 root    root          0 Jan 12  2019  GraphPaper
drwxr-xr-x  2 root    root          0 Jan 12  2019  Help
drwxr-xr-x  2 root    root          0 Jul 18  2019 'Journal Data'
drwxr-xr-x  2 root    root          0 Jul 18  2019  LabView
drwxr-xr-x  2 root    root          0 Oct 13 00:06 'Laptop Backup'
drwxr-xr-x  2 root    root          0 Jul 18  2019  LillyPond
drwxr-xr-x  2 root    root          0 Mar 10  2019  LTspice
drwxr-xr-x  2 root    root          0 Jan 12  2019  MathCAD
drwxr-xr-x  2 root    root          0 Jul 18  2019  Maxima
drwxr-xr-x  2 root    root          0 Jul 18  2019  Media
drwxr-xr-x  2 root    root          0 Jan 12  2019  MicroCapture
drwxr-xr-x  2 root    root          0 Nov 10  2017  Octave
drwxr-xr-x  2 root    root          0 Jan 12  2019  OneNote
drwxr-xr-x  2 root    root          0 Mar 10  2019  PowerPoint
drwxr-xr-x  2 root    root          0 Jan 12  2019  Programming
drwxr-xr-x  2 root    root          0 Mar 10  2019  Projects
drwxr-xr-x  2 root    root          0 Jul 27  2019  RawITpFramesTesting
drwxr-xr-x  2 root    root          0 Apr  1 01:12 '#recycle'
drwxr-xr-x  2 root    root          0 Jul 27  2019  Scilab
drwxr-xr-x  2 root    root          0 Jun 30  2017 'Server Drafts'
drwxr-xr-x  2 root    root          0 Jul 27  2019 'Sheet Music'
drwxr-xr-x  2 root    root          0 Mar 22 17:10  Sheets
drwxr-xr-x  2 root    root          0 Jan 12  2019  SMath
drwxr-xr-x  2 root    root          0 Oct 28  2018  ABCDE
drwxr-xr-x  2 root    root          0 Jun 11  2019 'Spec'\''s & Mil Spec'\''s'
-rwxr-xr-x  1 root    root    1538286 Jul 28  2019  sync.ffs_db
-rwxr-xr-x  1 root    root         16 Oct 29 12:36  SyncToy_99bb1b83-ad68-4f2d-b741-1c5d0d4fc881.dat
-rwxr-xr-x  1 root    root         16 Nov 12 23:51  SyncToy_c069fb94-80fc-4582-8bde-0b1974c4b724.dat
drwxr-xr-x  2 root    root          0 Jan 12  2019  Synergy
drwxr-xr-x  2 root    root          0 Jul 18  2019 'System Enhancements'
drwxr-xr-x  2 root    root          0 Mar 22 16:52  Problems
drwxr-xr-x  2 root    root          0 Jan 12  2019  VB
drwxr-xr-x  2 root    root          0 Feb 24  2019  wXmaxima
abc@PC01:~/mntpoint$
---------------------------------------------------------------------------------------------------


Executing the following chown command to change the ownership of the directories and the files:


---------------------------------------------------------------------------------------------------
Code:
abc@PC01:~/mntpoint$ 
abc@PC01:~/abc$ sudo chown -R abc:abc *.*
abc@PC01:~/abc$
---------------------------------------------------------------------------------------------------

Now, executing a directory listing again gives:

---------------------------------------------------------------------------------------------------
Code:
abc@PC01:~/mntpoint$ ls -all
total 1516
drwxr-xr-x  2 root    root          0 Mar 31 01:40  .
drwxr-xr-x 21 abc     abc        4096 Apr  9 17:55  ..
drwxr-xr-x  2 root    root          0 Jul 18  2019  Appliances
drwxr-xr-x  2 root    root          0 Jul 14  2019  Applications
drwxr-xr-x  2 root    root          0 Jun 11  2019  Backup
drwxr-xr-x  2 root    root          0 Mar 27 00:28  Bills
drwxr-xr-x  2 root    root          0 Jul 18  2019 'Bookmarks and Addressbooks'
drwxr-xr-x  2 root    root          0 Mar 22 16:55  Computers
drwxr-xr-x  2 root    root          0 Mar 18  2019  Concur
drwxr-xr-x  2 root    root          0 Feb  2 21:57  Databases
drwxr-xr-x  2 root    root          0 Mar 31 01:38  Datasheets
drwxr-xr-x  2 root    root          0 Feb  2 21:57  DirSyncPro
drwxr-xr-x  2 root    root          0 Mar 22 17:10  Docs
drwxr-xr-x  2 root    root          0 Jul 18  2019  Docs2
drwxr-xr-x  2 root    root          0 Mar 30 20:37  Drawings
drwxr-xr-x  2 root    root          0 Jul 27  2019  Drivers
drwxr-xr-x  2 root    root          0 Jul 18  2019  DSP
drwxr-xr-x  2 root    root          0 Jul 18  2019  Images
drwxr-xr-x  2 root    root          0 Jul 18  2019 'E-Mail Data'
drwxr-xr-x  2 root    root          0 Aug 19  2018  Equipment
drwxr-xr-x  2 root    root          0 Jul 18  2019 'Family Data'
drwxr-xr-x  2 root    root          0 Mar 31 01:38  Filesync
drwxr-xr-x  2 root    root          0 Nov 12  2018  FreeFileSync
drwxr-xr-x  2 root    root          0 Jan 12  2019 'G13 Profiles'
drwxr-xr-x  2 root    root          0 Mar 22 17:07  Games
drwxr-xr-x  2 root    root          0 Jul 18  2019  Graphics
drwxr-xr-x  2 root    root          0 Jan 12  2019  GraphPaper
drwxr-xr-x  2 root    root          0 Jan 12  2019  Help
drwxr-xr-x  2 root    root          0 Jul 18  2019 'Journal Data'
drwxr-xr-x  2 root    root          0 Jul 18  2019  LabView
drwxr-xr-x  2 root    root          0 Oct 13 00:06 'Laptop Backup'
drwxr-xr-x  2 root    root          0 Jul 18  2019  LillyPond
drwxr-xr-x  2 root    root          0 Mar 10  2019  LTspice
drwxr-xr-x  2 root    root          0 Jan 12  2019  MathCAD
drwxr-xr-x  2 root    root          0 Jul 18  2019  Maxima
drwxr-xr-x  2 root    root          0 Jul 18  2019  Media
drwxr-xr-x  2 root    root          0 Jan 12  2019  MicroCapture
drwxr-xr-x  2 root    root          0 Nov 10  2017  Octave
drwxr-xr-x  2 root    root          0 Jan 12  2019  OneNote
drwxr-xr-x  2 root    root          0 Mar 10  2019  PowerPoint
drwxr-xr-x  2 root    root          0 Jan 12  2019  Programming
drwxr-xr-x  2 root    root          0 Mar 10  2019  Projects
drwxr-xr-x  2 root    root          0 Jul 27  2019  RawITpFramesTesting
drwxr-xr-x  2 root    root          0 Apr  1 01:12 '#recycle'
drwxr-xr-x  2 root    root          0 Jul 27  2019  Scilab
drwxr-xr-x  2 root    root          0 Jun 30  2017 'Server Drafts'
drwxr-xr-x  2 root    root          0 Jul 27  2019 'Sheet Music'
drwxr-xr-x  2 root    root          0 Mar 22 17:10  Sheets
drwxr-xr-x  2 root    root          0 Jan 12  2019  SMath
drwxr-xr-x  2 root    root          0 Oct 28  2018  ABCDE
drwxr-xr-x  2 root    root          0 Jun 11  2019 'Spec'\''s & Mil Spec'\''s'
-rwxr-xr-x  1 root    root    1538286 Jul 28  2019  sync.ffs_db
-rwxr-xr-x  1 root    root         16 Oct 29 12:36  SyncToy_99bb1b83-ad68-4f2d-b741-1c5d0d4fc881.dat
-rwxr-xr-x  1 root    root         16 Nov 12 23:51  SyncToy_c069fb94-80fc-4582-8bde-0b1974c4b724.dat
drwxr-xr-x  2 root    root          0 Jan 12  2019  Synergy
drwxr-xr-x  2 root    root          0 Jul 18  2019 'System Enhancements'
drwxr-xr-x  2 root    root          0 Mar 22 16:52  Problems
drwxr-xr-x  2 root    root          0 Jan 12  2019  VB
drwxr-xr-x  2 root    root          0 Feb 24  2019  wXmaxima
abc@PC01:~/mntpoint$
---------------------------------------------------------------------------------------------------

As before, no effect.

Any and all assistance in this endeavor will be most appreciated.

Thank You

bruceam

Last edited by bruceam; 04-11-2020 at 11:02 AM.
 
Old 04-11-2020, 01:55 AM   #4
berndbausch
LQ Guru
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 5,021

Rep: Reputation: 1504Reputation: 1504Reputation: 1504Reputation: 1504Reputation: 1504Reputation: 1504Reputation: 1504Reputation: 1504Reputation: 1504Reputation: 1504Reputation: 1504
Code:
abc@PC01:~/abc$ sudo chown -R abc:abc *.*
If I can believe the above, your current working directory is ~/abc. Thus, you change ownership of files in ~/abc, not ~/mntpoint. But perhaps that is due to a typo.

Furthermore, you only change ownership of files whose names contain a dot.

But I am not certain if chown actually works on CIFS filesystems. For example, see this discussion: https://unix.stackexchange.com/quest...ions-and-chown. I would unmount the filesystem and mount it again as follows:
Code:
mount -t cifs -o username=xxxxxx,password=yyyyyy,rw,uid=1234,gid=5678 //192.168.xxx.xxx/SHARE /home/abc/mntpoint
where 1234 and 5678 are the user ID and group ID of user abc.
 
1 members found this post helpful.
Old 04-11-2020, 02:21 AM   #5
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,705

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
The mount command is issued with root privileges, so that explains why root is the owner. Instead you could do something like
Code:
mount -t cifs -o username=xxxxxx,password=yyyyyy,uid=1000 //192.168.xxx.xxx/SHARE /home/abc/mntpoint
where uid=1000 represents user abc (or just use uid=abc)
 
1 members found this post helpful.
Old 04-11-2020, 02:28 AM   #6
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,705

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Another option is to set the file and group permissions using the 'file_mode='and 'dir_mode=' directives
Code:
mount -t cifs -o username=xxxxxx,password=yyyyyy,file_mode=0775,dir_mode=0775 //192.168.xxx.xxx/SHARE /home/abc/mntpoint
This will still retain root ownership, but other users will have r/w access.
 
1 members found this post helpful.
Old 04-11-2020, 03:14 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 14,976
Blog Entries: 9

Rep: Reputation: 4240Reputation: 4240Reputation: 4240Reputation: 4240Reputation: 4240Reputation: 4240Reputation: 4240Reputation: 4240Reputation: 4240Reputation: 4240Reputation: 4240
What does the mount command actually say when it fails?
Use the '-v' option.
 
Old 04-11-2020, 03:21 AM   #8
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,705

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
@ondoho: There was no mention of the mount failing. The OP just wants r/w access for the user.
 
Old 04-11-2020, 10:59 AM   #9
bruceam
Member
 
Registered: Nov 2008
Location: Atlanta, Georiga
Distribution: Debian, Ubuntu
Posts: 88

Original Poster
Rep: Reputation: 17
berndbausch

I tried your suggestion to include the uid and the gid in the command, and it work!!!!! I used:


Code:
mount -t cifs -o username=xxxxxx,password=yyyyyy,rw,uid=1234,gid=5678 //192.168.xxx.xxx/SHARE /home/abc/mntpoint

When listing the contents of the mounted directory, I was greeted with owner and group settings for 'abc'. I was able to move, copy, create, and delete data from the Share!!!!


berndbausch, Thanks Again!

Thanks again to everyone, especially 'ferrari' !!! All of your suggestions and comments gave insight into the problem, and avenues to explore!!!
 
Old 04-11-2020, 04:41 PM   #10
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 4,705

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Good to read of your success with this. Yes, that is the simplest approach for the case where there is only one user. For a multiple-user situation, the mount options described in post #6 are required.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
question: 'onclick' within 'onmouseover' within 'form' within 'table' - how is it possible? rblampain Programming 4 04-25-2017 08:49 PM
Accessing network shares in wine Emegra Linux - Software 6 01-27-2012 12:47 PM
Visibility of Network Shares from within Applications Rfahrytas Linux - Newbie 2 05-16-2008 09:19 AM
Accessing domain from within the network megabot Linux - Networking 1 04-28-2006 12:01 PM
Accessing network shares brianread SUSE / openSUSE 8 05-25-2005 01:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:35 AM.

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