Linux mount error permission denied

ошибка монтирования 13 = Отказано в доступе

Один из моих серверов настроен на автоматическое монтирование каталога Windows с помощью fstab. Однако после последней перезагрузки он перестал работать. Строка в fstab:

Я делаю, mount -a и я получаю mount error 13 = Permission denied . Если я сделаю это достаточно, он заблокирует мою учетную запись Windows, поэтому я знаю, что она пытается. Я проверил, что мой пароль правильный.

Что я делаю не так?

Несколько вещей, чтобы проверить. Я делаю нечто подобное, и вы можете протестировать монтирование напрямую, используя mount команду, чтобы убедиться, что все настроено правильно.

Разрешения на файл учетных данных

Убедитесь, что этот файл разрешен правильно.

Многословное крепление

Вы можете получить больше информации, mount используя -v переключатель, который часто показывает вам, где что-то происходит.

Результатом этого вывода, если он работает:

Проверьте логи

После выполнения вышеупомянутой команды монтирования загляните в свои файлы dmesg и / /var/log/messages или на /var/log/syslog наличие сообщений об ошибках, которые могли быть сгенерированы при попытке mount .

Тип безопасности

Вы можете передать много дополнительных опций через -o .. переключатель для монтирования. Эти параметры зависят от технологии, поэтому в вашем случае они применимы к mount.cifs конкретным. Взгляните на mount.cifs справочную страницу, чтобы узнать больше обо всех возможностях, которые вы можете передать.

Я подозреваю, что вы упускаете возможность sec=. . В частности, один из этих вариантов:

Вы , возможно , потребуется настроить sec=. параметр так , что это либо sec=ntlm или sec=ntlmssp .

Источник

ошибка монтирования 13 = Разрешение отклонено

Один из моих серверов настроен на автоматическое монтирование каталога Windows с помощью fstab. Однако после моей последней перезагрузки она перестала работать. Строка в fstab:

Я делаю mount -a , и я получаю mount error 13 = Permission denied

Что я делаю неправильно?

4 ответа

Спасибо, но еще один поисковик поднял решение. По умолчанию использовался неправильный тип безопасности; эта команда работала:

Несколько вещей, чтобы проверить. Я делаю что-то подобное, и вы можете протестировать его монтированием напрямую, используя команду mount , чтобы убедиться, что у вас есть правильная настройка.

Разрешения на файл учетных данных

Убедитесь, что этот файл прав.

Вертикальное крепление

Вы можете уговорить больше информации из mount с помощью -v , который часто показывает вам, где все происходит.

Результат в этом выходе, если он работает:

Проверьте журналы

После запуска указанной команды mount загляните внутрь dmesg и /var/log/messages или /var/log/syslog для любых сообщений об ошибках, которые могут быть сгенерированы при попытке выполнить mount

Тип безопасности

Вы можете передать множество дополнительных опций с помощью переключателя -o .. для монтирования. Эти параметры относятся к конкретным технологиям, поэтому в вашем случае они применимы к mount.cifs . Взгляните на man-страницу mount.cifs , чтобы узнать больше о всех параметрах, которые вы можете передать.

Читайте также:  Svchost exe windows explorer

Я подозреваю, что вам не хватает опции sec=. . В частности, один из следующих вариантов:

Вам может потребоваться настроить параметр sec=. , чтобы он был либо sec=ntlm или sec=ntlmssp .

Ссылки

Я столкнулся с этой проблемой, и проблема оказалась не в правильном форматировании значений в моем файле учетных данных. Я пробовал:

Я также пробовал:

Как только я только использовал свое имя пользователя для входа:

Я смог получить мое крепление cifs для успеха.

Это добавляет работу над научным Linux 6.6 (RedHat 6.6)

изменить /etc/fstab
create file = .credentials (например, в /etc ) с этими деталями:

Источник

mount error 13 = Permission denied

One of my servers is set up to automatically mount a Windows directory using fstab. However, after my last reboot it stopped working. The line in fstab is:

The .Smbcredentials file is:

I do a mount -a and I receive mount error 13 = Permission denied . If I do this enough it will lock out my Windows account, so I know it’s trying. I’ve checked that my password is correct.

What am i doing wrong?

5 Answers 5

A couple of things to check out. I do something similar and you can test mount it directly using the mount command to make sure you have things setup right.

Permissions on credentials file

Make sure that this file is permissioned right.

Verbose mount

You can coax more info out of mount using the -v switch which will often times show you where things are getting tripped up.

Resulting in this output if it works:

Check the logs

After running the above mount command take a look inside your dmesg and /var/log/messages or /var/log/syslog files for any error messages that may have been generated when you attempted the mount .

Type of security

You can pass a lot of extra options via the -o .. switch to mount. These options are technology specific, so in your case they’re applicable to mount.cifs specifically. Take a look at the mount.cifs man page for more on all the options you can pass.

I would suspect you’re missing an option to sec=. . Specifically one of these options:

You may need to adjust the sec=. option so that it’s either sec=ntlm or sec=ntlmssp .

Источник

Permission denied for user accessing mount

Using root I can mount another Linux share no problem.

Root can read/write to the share dirs no problem.

When trying to access the dir under another user, even when the user is part of the ‘users’ group it gets permission denied.

3 Answers 3

As mentioned in one of the comments, try mounting the share using these options:

or this to forgo confusion with regards to CIFS POSIX extensions, as explained in another answer on here.

Depending on your system, the introduction of systemd and udev in Linux has changed how filesystems get mounted once again. However, I’m not sure that/how CIFS/Samba shares are affected by this.

According to Mark Cohen’s answer, you need some kind of change permission action.

Читайте также:  P2p клиенты для windows

But simple sudo chmod 777 javalib will crash with another permission denied. You need to add mount options -o username=guest,dir_mode=777,file_mode=666 to make directories executable for everyone.

If this method won’t help, then you may need to add options, such as -o uid=$(whoami) .

I also have this problem and the only thing which worked for me was this:

  1. 192.168.10.10 by the IP of remote computer
  2. directory\ name by the remote directory absolute path
  3. remote\ user\ name by the remote user account used to authenticate
  4. vers=1.0 by the version of the smb protocol implemented on the remote computer

After you run this command, it will prompt by your remote\ user\ name password.

Just do not forget to install: sudo apt-get install cifs-utils

If you have any problems with this command line, as some nuts errors like:

You can run this to see what the error was

On this case, if you search on Google you will see the error was that I ran the command without specifying the vers=1.0 argument.

Источник

Cannot Mount Windows 7 Share from Linux using CIFS: Mount error(13): Permission denied

We have a windows XP share entry in our FSTAB that works as follows:

But the entry for a Windows 7 box does not:

The directory /mnt/Win7VM is set to 777 permissons and owned by user 1001

So we try to debug a bit and mount manually.

Just as a check, the following works:

But for the windows 7 machine, this does not work.

As I get the error (which is famous I guess):

So, I spend hours searching, checking, and trying to do the following:

  • Workgroup is «WORKGROUP»
  • Domain is «MAIN-WIN7»
  • User is «Main»
  • Password is not set
  • Share is Win7VM
  • Share is available through network shares in windows
  • Changed Windows security policy settings of «Microsoft Network Client: Send un-encrypted passwords to third party» to «Enabled»
  • Changed Windows security policy of «Network Security: LAN manager authentication level in to send LM & NTLM — use NTLMv2 session security if negotiated»
  • Turned off all anti virus and firewalls
  • Adding «sec=ntlm» switch as in «/mnt/Win7VM -o username=Main,password=»,sec=ntlm»
  • Adding domain to user as in «MAIN-WIN7/Main»
  • Using «mount.cifs» instead of «mount -t cifs»
  • CHMOD mount directory to 777 CHOWN mount directory to user «1001» and Group to «user» (will need this for fstab entry if I can get it to mount manually)

Share is on Windows 7 Ultimate and Client with permission errors is Debian Wheezy.

Now I am out of searching terms and ideas. I thought this would be simple; now I have wasted hours. Anyone got any ideas? Its probably something simple right?

Forgot the dummy check of trying to access the share from a windows computer. It did not work leading me to investigate more windows settings which led me to the solution posted below.

2 Answers 2

Leave it to Windows to be the problem, NOT Linux.

Solution was to change the sharing AND the security settings of the share to include the necessary permissions.

Found a video here on you tube that was the final piece of the puzzle.

Читайте также:  Windows 10 можно ли установить без обновления

Essentially you give both sharing and security permissions to «EVERYONE» on the drive you want to share (this probably is true for a folder as well, but that is not what I was trying to share).

For the first, go to the drive and then go to Properties>Sharing>Advanced Sharing>Permission and on the «EVERYONE» group/user assign all the permissions. If everyone is not listed, then add them to the list.

For the second go to Properties>Security>Edit>Add and add «EVERYONE». Then assign all the permission you want to «EVERYONE».

As a note I also identified the network as «private» via Control Panel>Administrative Tools>Local Security Policy>Network Manger List Policies> then selected the applicable network and changed the location to «Private».. Not sure if this affected anything in the end.

I am sure the default settings are all for a good cause and by giving «everyone» full control permissions opened some gaping hole that will cause my computer and network to explode by some people’s interpretation of future event, but hey, it fixed the problem.

This might be weird, but as I used the previous answer, it seemed it did not solve all the problems. But I found a combination of solutions the seemed to actually fix the problem and since this problem seems so prevalent, it seemed prudent to post my fix.

First note some items in windows and change some settings. Note user name, password, and workgroup (domain). I left my «homegroup» as well.

Also change a registry entry to prevent memory allocation errors with larger ( HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size to «3»

A link to additional info about this registry setting is Here.

Now restart the LanmanServer to apply the registry settings. Open the CMD prompt with administrator rights and type in:

That solution came from Here

Now hopefully windows is ready to go.

Next the linux side. The big change that worked was putting the share’s user and server information into a credentials file instead of the mounting command. This was the final magic piece that I thought would not do any thing and it started working immediately after the change (albeit with memory issues that we solved above). Do this by creating a file with:

Then add a «cred» parameter to the fstab entry. I also added a rw parameter. And just in case, I changed the uid and gid to my the user logged in on the linux box. 1001 might work, I just have not tried it.

So my final fstab entry looked like this.

Details of some of this came from Here

Transferring files both directions has worked flawlessly along with reading and deleting where my answer before still had some permissions issues with writing and deleting that I was just working around and had not come back to this question. This also solve the memory allocation issues that are bound to arise that seem like they are on the Linux side, but required the windows registry change to be fixed.

Источник

Оцените статью