Domanda

I have an error while i want to copy my file in centos 6.5 using samba to my windows 7 folder. This is the error message :

you need permission to perform this action
You require permission from ERP\hao to make change to this file.

[global]
    workgroup = MYGROUP
    server string = Samba Server Version %v
    log file = /var/log/samba/log.%m
    # max 50KB per log file, then rotate
    max log size = 50
    security = user
[erp]
    comment = ERP
    path = /opt/erp
    public = yes
    writable = yes
    printable = no
    browseable = no
    create mask = 0777
    create mode = 0777
    directory mode = 0777
    share modes = yes
    force user = hao
    force group = hao
    read only = no

File that i want to copy location :

/opt/erp/mve

my samba path

/opt/erp

[hao@erp mve]$ stat -c '%a %n' *
777 7841e10a957d4bceb2205632c49543af.ygk
777 p18i13847jgnl1s91kujqlh1t9c3.ygk

[hao@erp erp]# ls -l mve/
-rwxrwxrwx. 1 hao hao  63467455 Mar 10 21:38 7841e10a957d4bceb2205632c49543af.ygk
-rwxrwxrwx. 1 hao hao 111912448 Mar 10 21:46 p18i13847jgnl1s91kujqlh1t9c3.ygk

[root@erp erp]# smbd --version
Version 3.6.9-167.el6_5


[hao@erp erp]# ls -l
drwxrwxrwx.  2 hao hao       4096 Mar 11 09:42 mve

I Can copy all files in /opt/erp except in mve folder. Please help, how to fix this problem. Please advice. Thank you.

È stato utile?

Soluzione

This worked for me on Windows 7 when using CentOS 6.5.

http://rbgeek.wordpress.com/2012/05/25/how-to-install-samba-server-on-centos-6/

Slight changes to instructions..

  1. The workgroup will need to change based on yours specifically (set value in /etc/samba/smb.conf).
  2. Use \\192.168.x.x\ instead of \\centos on Windows.
  3. You'll need to create the folders /samba and /samba/share and set permissions appropriately.
  4. If your OS doesn't have nano (per the instructions), then install that before you begin... yum install nano
  5. Run restart commands (2 of them) at the end twice, since the shutdown won't apply. Make sure you get OK on both.

Altri suggerimenti

I had a similar problem and it turned out to be related to the SELinux security context.

I had to run the command chcon -t samba_share_t /<path>/<to>/<share> -R.

Now i can create and change files in the shared folder.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top