Linux mount failed 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 .

Источник

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.

Читайте также:  Самый безопасный браузер для linux mint

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.

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:

Читайте также:  Kyocera сетевое сканирование windows 10

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.

Источник

NFS mount fails, permission denied, no export entry

I have a problem mounting a NFS share that I can’t solve that is driving me nuts. This is the situation:

Three machines involved:
Host A: mandrake, IP 192.168.1.4, NFS server
Host B: athlon64, IP 192.168.1.64, NFS client
Host C: lap-fzs-2, IP 192.168.1.27, NFS client

Host A has an NFS server running which exports a directory that gets mounted by host B. This works flawless and has been working since ages. No problemo. Now host C comes into the picture. Ubuntu 12.04 LTS, modern system. I tried to mount the same share from host A but get a permission denied error:

The fact that it works between hosts A and B should be prove that the NFS export per se is working. Here is the info I can give that makes me think it should work. Maybe someone sees what I don’t and knows why this fails on the new host C.

The portmapper is running, the exports are known and mounted by host B «athlon64».

When the athlon64 host mounts the NFS share, the server log shows success:

But when the host C tries to mount the same share, the server log shows:

Host C sees the server, reaches the portmapper and the nfsd, but fail at the permissions.

I have to use NFSv2 on the client. Using NFSv4 will fail as the server doesn’t support it. It fails as it tries to connect via TCP directly to 2049 but the port isn’t open. No fallback happens. Using NFSv3 will result in a RPC program/version mismatch.

What am I missing?

Update:
All three machines are on one LAN, on the same switch. There is no firewall active on host C:

Источник

mount error(13): Permission denied

I know this question has been asked before, but I’ve been looking for a solution for a couple of hours now and nothing seems to be working.

The frustrating thing is that it used to work on my previous install, so I know the commands I try should work.

I’m running a vanilla install of Ubuntu 13.04 server.

I have a server running at 192.168.1.130 and two shares: LaCie and Seagate 2TB.

I used to have these lines in my fstab file:

Now that I re-installed my server, but don’t need it permanently I tried the following:

Читайте также:  Whea internal error windows

However, I get the error mount error(13): Permission denied .

I’m sure the credentials are correct. Nothing has changed at the windows side.

Also, I installed the packages samba , cifs-utils too. Nothing helped.

7 Answers 7

i had this same error. what solved it for me is reverting mount.cifs’s security parameter back to its previous default as indicated here and in mount.cifs’ manpage:

The default in mainline kernel versions prior to v3.8 was sec=ntlm. In v3.8, the default was changed to sec=ntlmssp.

in your case, the new command would be

notice sec=ntlm at the end

This solved the problem! (i.e., leave the quotation marks out!)

In my case, it turned out to be time issues on the Windows machine — it has some problem where its time lags severely, in the range of 2 days per week (most likely the motherboard battery needs replacing). I manually updated the time and mount succeeded.

Arch Linux machine connecting to a Windows XP one, but I’d suspect it would be a problem for Ubuntu to newer Windowses as well.

I am using Ubuntu 14.04.1 LTS after upgrading and had the same problem

What I did to immediately remap the network folder was:

Hope it helps others

Thanks to the answers above, I was able to mount my Seagate personalCloud onto my raspberry Pi. I slightly tuned the commands above like this:

=> for the Public folder: sudo mount -t cifs -o noperm //192.168.1.x/Public /home/pi/Documents/PATH

=> for the private folder (needs the username/pwd): sudo mount -t cifs -o username= ,password=

I can now browse through the Seagate PersonalCloud like a normal disk!

I had this issue as well. I’m using centos (rpm based). I was getting mount error(13): Permission denied as well. Then I discovered that the problem was caused by SELinux (the lack of public_content_t context type) and of course the samba user smbpasswd -a should have ownership of the directory.

  • semanage fcontext -a -t public_content_t «/mydir(/.*)?» — adding public_content_t, verify using ls -lZ . Alternatively, turn off the selinux — setenforce 0 (runtime), edit either /etc/sysconfig/selinux or /etc/selinux/config by adding/altering SELINUX=disabled (permanently)
  • chown :user1 /mydir && chmod +0070 /mydir — giving an access for group, the member of which the samba user is.

For me the fstab mount was failing because setting the _netdev option reports eth0 up and running prior to dhcp completing. This causes the mount to run prior to having an IP address from DHCP.

I’m using a raspberry pi on Jessie OS. My solution was

Источник

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