LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-20-2015, 04:35 PM   #1
morganjeff7272
Member
 
Registered: Dec 2015
Location: Oklahoma City
Distribution: Ubuntu
Posts: 38
Blog Entries: 2

Rep: Reputation: Disabled
CIFS sharing issue


I have the following line in my /etc/fstab
Code:
//192.168.0.11/d /media/media-pc-d cifs credentials=/home/ep/extra/.smbcred,iocharset=utf8,sec=ntlm 0 0
The share is mounted and I can access files that are there. But I can not add new files or change existing ones if needed.
What am I missing?
 
Old 12-20-2015, 06:02 PM   #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
A share can be configured for read and write access per account. It would seem that the credentials you provide in .smbcred are good for read access but not for writing. Check the configuration of the D share on 192.168.0.11.
 
Old 12-20-2015, 06:06 PM   #3
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
By the way, you are not supposed to ask the same question more than once. People might answer one of your questions while the other one is already answered or solved (as is your case).

A post can only be deleted by a moderator. Use the REPORT button for that.
 
Old 12-20-2015, 06:51 PM   #4
morganjeff7272
Member
 
Registered: Dec 2015
Location: Oklahoma City
Distribution: Ubuntu
Posts: 38

Original Poster
Blog Entries: 2

Rep: Reputation: Disabled
Thank you for your reply

Ok 1. I can not report the first question that i placed in a wrong spot. Stated I did not have permission to do so!

2. You stated that CIFS permissions sre based upon the windows user, however in my research I found several pages showing that that might not be the case. Any ways my remoteUser windows user has full control of D drive and I double checked all the folders on the windows system to verify. I remote in from another windows system using the remoteUser credentials and I can RWX files.

On the Ubuntu box however I can not I can as root using sudo commands in terminal but not as user, ep or 1000.

Any help?
 
Old 12-20-2015, 10:15 PM   #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
Quote:
Originally Posted by morganjeff7272 View Post
On the Ubuntu box however I can not I can as root using sudo commands in terminal but not as user, ep or 1000.
Hmmm, that would indicate that the UNIX permissions are not set correctly on the share. My knowledge of this is hazy, but I think you can separate Windows and UNIX permissions and set them individually.

So, can you just do a long directory listing (ls -ld) of a directory where user or ep have read but no write permissions?
I expect to see permissions and ownership similar to this:
Code:
rwxr-xr-x  root  root
To fix this, try sudo chmod 777.
 
Old 12-21-2015, 07:08 PM   #6
morganjeff7272
Member
 
Registered: Dec 2015
Location: Oklahoma City
Distribution: Ubuntu
Posts: 38

Original Poster
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
So, can you just do a long directory listing (ls -ld) of a directory where user or ep have read but no write permissions?
I expect to see permissions and ownership similar to this:
Code:
rwxr-xr-x root root
To fix this, try sudo chmod 777.
FYI I changed from ubuntu to porteus and box is a ton more stable but I still have the issue.

You asked for long directory list. before mount command. chmod worked and i can change it around how ever I want...
drwxrwxr-x 2 root root 4096 dec 21 17:01 media-pc-d

After mount command. Chmod command does not change it errors out " changing permissions of /mnt/media-pc-d : Permission denied
Yes as root
drwxr-xr-x 2 root root 4096 dec 21 17:01 media-pc-d

ive tried adding the rw option and removing the sec=ntlm option. I still only have r-x as user
 
Old 12-21-2015, 07:33 PM   #7
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
If you can't change the permissions, then the account in .smbcred doesn't have appropriate access permissions on the share.
 
Old 12-21-2015, 07:52 PM   #8
morganjeff7272
Member
 
Registered: Dec 2015
Location: Oklahoma City
Distribution: Ubuntu
Posts: 38

Original Poster
Blog Entries: 2

Rep: Reputation: Disabled
I have checked and rechecked permissions in the windows secrity and the use in my credentials file has full control. Is there a log file that I can tail and see if it tells me anything regarding the mount command or chmod?
 
Old 12-21-2015, 10:12 PM   #9
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
The logs are on the server. If it's a Samba server, they are usually under /var/log/samba. You can also select the log level in the smb.conf file. If it's a Windows server, I am sure it's possible but wouldn't know how.
 
Old 12-22-2015, 05:38 AM   #10
morganjeff7272
Member
 
Registered: Dec 2015
Location: Oklahoma City
Distribution: Ubuntu
Posts: 38

Original Poster
Blog Entries: 2

Rep: Reputation: Disabled
Is there a log file on the unix box, it is not samba server, where i can see the mount command and or chmod command returns?
 
Old 12-22-2015, 06:50 AM   #11
morganjeff7272
Member
 
Registered: Dec 2015
Location: Oklahoma City
Distribution: Ubuntu
Posts: 38

Original Poster
Blog Entries: 2

Rep: Reputation: Disabled
I apologize for my inepttitude, LOL I dislike windows non domain issues. I followed the following guide.
http://www.howtogeek.com/176471/how-...ows-and-linux/
I found that my D drive was restricted read only on advanced sharing permissions. But in security full access, And you know windows if they don't match then most restrictive is used.
So I set that up and re mounted the share and ARGHH still restricted to r-x

I will continue to research, ill start with brand new share and figure this out when I figure it out Ill post, Im on the right track it has to be on the windows side. WINDOWS REGRESSION,LMAO.

also may have to do with guest login instead of user but my ls - al of /mnt shows still drwxr-xr-x and as root I can write in the folder I would think that even root would not be able to write if the permissions did not match???!!!
 
Old 12-22-2015, 07:06 AM   #12
fmattheus
Member
 
Registered: Nov 2015
Posts: 104

Rep: Reputation: 38
There are a number of places where the rights need to be correct.
You've already verified that the Windows user has the proper permissions.
You've also verified that the root user can modify the files. That means that samba is working correctly.
The only thing you need to do is give a specific unix user permission to right to this mount.
This is done via the uid= and gid= options in the fstab. See man mount.cfs
 
Old 12-23-2015, 07:56 AM   #13
morganjeff7272
Member
 
Registered: Dec 2015
Location: Oklahoma City
Distribution: Ubuntu
Posts: 38

Original Poster
Blog Entries: 2

Rep: Reputation: Disabled
Thank you for the information I will try those options again as soon as I get arch-linux up and running, LMAO after installation no networking, still learning.
 
Old 12-23-2015, 08:59 PM   #14
morganjeff7272
Member
 
Registered: Dec 2015
Location: Oklahoma City
Distribution: Ubuntu
Posts: 38

Original Poster
Blog Entries: 2

Rep: Reputation: Disabled
Ouch, learned alot, Arch - linux up and running, stable with, Chrome and pepper flash, Blah Blah.
Also new netgear ac1900 router but still unstable internet network keeps stalling.

But anyway so here is my current command in fstab
Code:
//192.168.0.6/d /mnt/media-pc-d cifs credentials=/home/ep/.smbcred,gid=wheel,rw 0 0
Good news I see the Group as wheel in permissions when I look at properties of the mount but it is still read only.
 
Old 12-24-2015, 01:12 AM   #15
fmattheus
Member
 
Registered: Nov 2015
Posts: 104

Rep: Reputation: 38
Is your user in the group wheel? If it's a single user environment, use the uid parameter instead of gid.
 
  


Reply

Tags
cifs



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
Sharing linux folder with windows 2003 server using cifs vikaskale Linux - Newbie 1 07-13-2010 10:07 AM
Issue with a mount (CIFS) Uday123 Linux - Server 1 03-18-2010 03:59 AM
File sharing with cifs KFC123 Linux - Newbie 1 07-04-2009 08:57 AM
cifs locking issue slackamp Linux - Software 0 03-19-2007 10:24 AM
CIFS issue rlh989 Linux - Networking 1 01-26-2007 07:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:21 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