LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-21-2014, 08:26 AM   #1
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 441

Rep: Reputation: 22
Unhappy Samba Permission not worked :(


Hello Folks.
How are you?
I installed CentOS 6 and Samba, My Samba config is :

[Mahalle-PDF]
path=/mnt/c/archive-pdf
browsable = yes
guest ok = no
read only = yes
available = yes
valid users = @mygroup

I use "sudo smbpasswd -a <user_name>" and add my users to Samba then i use below commands to give permission to "archive-pdf" directory :

chgrp -R mygroup archive-pdf/
chmod -R g+rwx archive-pdf/

but, I can't browse the directory in windows and it show me an error about permission, Can you advice me?

Thank you.

Last edited by jokar.mohsen; 04-21-2014 at 08:39 AM.
 
Old 04-21-2014, 10:46 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by jokar.mohsen View Post
I installed CentOS 6 and Samba, My Samba config is :
Code:
[Mahalle-PDF]
path=/mnt/c/archive-pdf
browsable = yes
guest ok = no
read only = yes
available = yes
valid users = @mygroup
I use "sudo smbpasswd -a <user_name>" and add my users to Samba then i use below commands to give permission to "archive-pdf" directory :
chgrp -R mygroup archive-pdf/
chmod -R g+rwx archive-pdf/

but, I can't browse the directory in windows and it show me an error about permission, Can you advice me?
We can't tell you ANYTHING since you don't tell us what the error is. Just saying "error about permission" could be any one of several causes. You also don't tell us what the permissions are on that directory, and where the /mnt/c/archive-pdf directory points to. Is that shared to another machine? What filesystem? ANYTHING from the logs??
 
Old 04-21-2014, 12:38 PM   #3
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 441

Original Poster
Rep: Reputation: 22
Hello.
Thank you so much.
When I want to browse the IP, Windows tell me :

"You might not have permission to use this network resource. Contact the administratior of this server to find out if you have access permissions."

TB0ne, I mount /dev/sdb to /mnt/c and file system is Ext4. In your opinion is it my problem? With my scenario, Can you show me a correct config?

Thank you.
 
Old 04-21-2014, 12:58 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by jokar.mohsen View Post
Hello.
Thank you so much. When I want to browse the IP, Windows tell me :

"You might not have permission to use this network resource. Contact the administratior of this server to find out if you have access permissions."

TB0ne, I mount /dev/sdb to /mnt/c and file system is Ext4. In your opinion is it my problem?
You STILL don't give us
  • Anything from the log files
  • Permissions on that directory
...as asked previously, which has been mentioned to you several times in the past on other threads of yours. Making people guess at things and ask for the same information over and over, isn't good. Provide details and answer questions when asked, or posting threads is pointless.

The VERY OBVIOUS things to check would be permissions on that directory. And your mount command is confusing, since you say you're mounting an entire DEVICE (not a partition ON that device), to /mnt/c. What are the permissions on /mnt/c? And on /mnt/c/archive-pdf?
Quote:
With my scenario, Can you show me a correct config?
No, we can't, since you STILL don't provide enough details about your 'scenario' for us to guess at. A 'correct' config would assume we know what your environment looks like...and all we know is a few lines of one config file.
 
Old 04-21-2014, 01:35 PM   #5
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 441

Original Poster
Rep: Reputation: 22
If you see the first comment, I said that i used "chmod -R g+rwx archive-pdf/".
In your opinion is it necessary to give permission on /mnt/c? I want my users just access to "archive-pdf" and this directory is under the /mnt/c.

Cheers.
 
Old 04-21-2014, 01:42 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by jokar.mohsen View Post
If you see the first comment, I said that i used "chmod -R g+rwx archive-pdf/".
Yes, saw that. What we DIDN'T see is you actually posting the output of the "ls -l" command, showing us what permissions you had on that directory, in that location. And if the group doesn't have permission to read /mnt/c, they won't be able to traverse any lower in the tree, to see the directory, will they??

AGAIN: answer questions asked of you, or don't post.
Quote:
In your opinion is it necessary to give permission on /mnt/c? I want my users just access to "archive-pdf" and this directory is under the /mnt/c.
It is necessary to have the CORRECT permissions...which you STILL DON'T SHOW US, and STILL don't show us anything from your logs. If you're not going to answer questions asked of you, there isn't much point in posting.
 
Old 04-22-2014, 05:32 AM   #7
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 441

Original Poster
Rep: Reputation: 22
[root@Backup c]# ls -l
total 24
drwxrwx---. 2 root mygroup 16384 Apr 21 15:07 lost+found
drwxrwxr-x. 5 root mygroup 4096 Apr 21 19:14 archive-pdf

---------- Post added 04-22-14 at 03:02 PM ----------

[root@Backup c]# ls -l
total 24
drwxrwx---. 2 root mygroup 16384 Apr 21 15:07 lost+found
drwxrwxr-x. 5 root mygroup 4096 Apr 21 19:14 archive-pdf
 
Old 04-22-2014, 08:50 AM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by jokar.mohsen View Post
[root@Backup c]# ls -l
total 24
drwxrwx---. 2 root mygroup 16384 Apr 21 15:07 lost+found
drwxrwxr-x. 5 root mygroup 4096 Apr 21 19:14 archive-pdf
Ok...and you STILL AREN'T ANSWERING QUESTIONS. You have been asked SEVERAL TIMES to give us things from your log files, and haven't. You have been asked several times to show us permissions on the /mnt/c, and haven't. We had to ask THREE TIMES to get you to do this, and you STILL ignore the other questions.

Asking things over and over doesn't make people want to help you....either answer the questions asked of you, or don't bother posting.
 
  


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
Slackware 14.1, full install, sound card worked OK, but microphone is not worked. zw963 Slackware 7 11-23-2013 06:57 AM
samba file permission & build_sam_account issue in samba cnt Linux - Server 5 08-10-2011 01:19 PM
Samba MODIFY permission needs 'x' permission set in Linux? jlinkels Linux - Software 6 11-13-2009 09:30 AM
Samba maps worked. Rebuilt PC. No longer work. Huh? WorldBuilder Linux - Networking 2 12-01-2007 08:35 AM
Samba - dont have permission to browse samba share. Scrag Linux - Software 4 11-28-2006 01:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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