Unable to write linux

Linux Mint Forums

[SOLVED] Unable to write to network drive — permission denied

Forum rules
There are no such things as «stupid» questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

[SOLVED] Unable to write to network drive — permission denied

Post by HarryZ » Wed Mar 15, 2017 4:35 pm

Aloha again. I’m back with another question about writing to a network drive. I’m trying to use a program named HDDSuperClone (similar to ddrescue) which requires that it be run as root. But in a previous post, I learned that «Root is not allowed to read or write /run/1000/gvfs». Subsequent research shows that this appears to be bug / limitation of FUSE (see this bug report https://bugzilla.gnome.org/show_bug.cgi?id=560658). There are suggested work-around that mention mounting the gvfs filesystem in a different location. Unfortunately, while I understand the concept of this, I need some direction on exactly how to do this. I can use the command line, but am ignorant of the exact commands needed.

Or, if someone has a different solution, that would also be appreciated.

harryz@LinuxBench ~ $ inxi -Fxz System: Host: LinuxBench Kernel: 4.4.0-66-generic x86_64 (64 bit gcc: 5.4.0) Desktop: Cinnamon 3.2.7 (Gtk 3.18.9-1ubuntu3.2) Distro: Linux Mint 18.1 Serena Machine: Mobo: MSI model: H81M-E34 (MS-7817) v: 3.0 Bios: American Megatrends v: V17.5 date: 03/30/2015 CPU: Quad core Intel Core i5-4590 (-MCP-) cache: 6144 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 26400 clock speeds: max: 3700 MHz 1: 3616 MHz 2: 3531 MHz 3: 3694 MHz 4: 3621 MHz Graphics: Card: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller bus-ID: 00:02.0 Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa) Resolution: 1920x1080@60.00hz GLX Renderer: Mesa DRI Intel Haswell Desktop GLX Version: 3.0 Mesa 11.2.0 Direct Rendering: Yes Audio: Card-1 Intel 8 Series/C220 Series High Definition Audio Controller driver: snd_hda_intel bus-ID: 00:1b.0 Card-2 Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller driver: snd_hda_intel bus-ID: 00:03.0 Sound: Advanced Linux Sound Architecture v: k4.4.0-66-generic Network: Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169 v: 2.3LK-NAPI port: e000 bus-ID: 02:00.0 IF: enp2s0 state: up speed: 1000 Mbps duplex: full mac: Drives: HDD Total Size: 1500.3GB (1.0% used) ID-1: /dev/sda model: ST9500325AS size: 500.1GB ID-2: /dev/sdb model: WDC_WD1002FAEX size: 1000.2GB Partition: ID-1: / size: 394G used: 7.1G (2%) fs: ext4 dev: /dev/sdb5 ID-2: swap-1 size: 8.46GB used: 0.00GB (0%) fs: swap dev: /dev/sdb6 RAID: No RAID devices: /proc/mdstat, md_mod kernel module present Sensors: System Temperatures: cpu: 29.8C mobo: 27.8C Fan Speeds (in rpm): cpu: N/A Info: Processes: 209 Uptime: 50 min Memory: 1527.3/7860.4MB Init: systemd runlevel: 5 Gcc sys: 5.4.0 Client: Shell (bash 4.3.461) inxi: 2.2.35 harryz@LinuxBench ~ $ 

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

Источник

Читайте также:  Права доступа линукс цифры

Ошибка — xsession warning unable to write to tmp

Сразу мысль о том, что вся проблема в недавнем обновлении. Забегу вперед и скажу, что проблема совсем не в обновлении и не в системе.

Обновил систему — все работает, перезагрузился и ….

ошибка выглядит так

Вот такое окно появляется при попытке запустить графический интерфейс системы, после ввода логина и пароля.

Способ первый как разрешить вопрос с этой ошибкой

Первое, что пришло в голову восстановить систему из последнего бэкапа. Загрузился с Live образа Linux Mongaro.

Можно с любого Linux который грузится в режиме Live, с флешки или диска. Просто у меня под рукой был Mongaro.

После запуска открыл программу Timeshift, далее для восстановления системе надо указать где хранится архив.

Если выбрать ранее созданную архивную копию, то программа Timeshift восстановит ее и проблема будет решена.

Подробная процедура по работе с бэкапами описана мною ранее в этой статье.

Выясняем, что значит эта ошибка

Тут то я и задумался, а может все же почитать что это за ошибка? Восстановить то я всегда успею.

Открываю браузер и первым делом перевожу, что написано на не ведомом языке.

Из перевода понятно, что нет места в корневом разделе для записи новых данных.

Думаю не ужели обновления сожрали пол диска оставленного под корневой раздел, а это 20Гб.

До обновления 50% диска было свободно.

Способ второй как разрешить вопрос с этой ошибкой

Загружаюсь снова в систему и открываю терминал не входя в систему сочетанием клавиш Ctrl+Alt+F3

В терминале ввожу логин, пароль и выполняю пару команд для очистки системы

Вторая команда удалит не нужные системе пакеты

После перезагрузки системы, как правило, такая ошибка пропадает, ведь свободное место должно было появится.

Но не тут то было все осталось в прежнем состоянии.

Как я решил проблему и почему у меня появилась эта ошибка

Стал вспоминать, что делал перед последним выключением компьютера.

Читайте также:  Linux посмотреть модель сервера

Что-то же сожрало свободное место?

Запустился снова в Live режиме с флешки и начал просматривать каталоги по датам и времени изменения .

Проблему нашел почти сразу. Систему полностью забило резервными копиями программы Timeshift.

Нет это не сбой программы и не вредоносное ПО.

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

Переместил все резервные копии системы в нужное хранилище, удалив их из корневого раздела.

Запустил систему в обычном режиме.

Система запустилась без всяких проблем.

Еще раз убеждаюсь, что Linux намного надежнее и стабильнее Windows. Все косяки, как правило в linux мы делаем сами, из любопытства, ставя эксперименты.

Иногда по не знанию, пытаясь решить проблему быстро, здесь и сейчас, не думая.

Естественно после нормального запуска, я сразу поменял настройки в программе Timeshift.

Больше такого не повторялось.

Если есть, что добавить или поделится опытом пишите в комментариях.

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

Источник

Can’t write to mounted ext4 hard drive in Ubuntu 18.04

I just built a new computer. I’m running Ubuntu 18.04, and I’m not dual-booting. Ubuntu is installed on my SSD, but I’d like to also use an internal HDD (connected via SATA to my motherboard) for additional storage. I’ve been following this set of instructions to set things up. The HDD is formatted as ext4 and automatically mounts at boot, but that’s as far as I’ve got. I’m stuck on Step 4, moving folders from ~/home/ to the HDD and making symbolic links. I can’t drag folders from Home to the mounted HDD via the file explorer. I also cannot create new directories in the mounted HDD via the file explorer. When I check the permissions of the mounted HDD (via right-click->Properties->Permissions), it says «The permissions of ‘drivename’ could not be determined.» From doing some further research, I suspect this is a permissions issue; however, I have been unable to determine what specifically I need to do. How do I troubleshoot this and write to my internal HDD? Edit: The contents of my /etc/fstab file are as follows:

# /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # #      # / was on /dev/sdb1 during installation UUID=b928c257-beab-4352-81d0-9ae12955bf96 / ext4 errors=remount-ro 0 1 # /boot/efi was on /dev/sdb3 during installation UUID=5B6B-1052 /boot/efi vfat umask=0077 0 1 # /home was on /dev/sdb4 during installation UUID=8d372b78-f15c-4c85-b853-becfafa28d69 /home ext4 defaults 0 2 # swap was on /dev/sdb2 during installation UUID=1972e189-a0fe-448d-93db-c17028c913c8 none swap sw 0 0 /dev/disk/by-uuid/c0c74b6f-dedb-4a3e-b5d8-52cca8a0958e /mnt/stuff auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=Stuff 0 0 
sda ext4 c0c74b6f-dedb-4a3e-b5d8-52cca8a0958e /mnt/stuff 1.8T root disk brw-rw---- 

The HDD mount options could be the issue. Please edit your question and copy/paste the content of the /etc/fstab file

Читайте также:  Check files in use linux

Источник

Unable to write in folder in which my user has write access

Before I say anything, I know how permission for groups and users works. My setup is: a. my user is monkey and is in the group www-data groups monkey monkey : monkey adm cdrom sudo dip www-data plugdev lpadmin sambashare b. the root folder of apache is /home/monkey/var/www and has the permissions 0775 with owner www-data and group www-data ls -la /home/monkey/var/www total 8 drwxrwxr-x 2 www-data www-data 4096 Aug 12 10:37 . drwxr-xr-x 3 root root 4096 Aug 12 10:37 .. c. But I’m unable to write in /home/monkey/var/www/ monkey@ubuntu:~$ cp robots.txt var/www/robots.txt cp: cannot create regular file âvar/www/robots.txtâ: Permission denied The robots.txt file was created under monkey user. What am I missing?

2 Answers 2

your parent folder permissions ( var set to 755 and owner of root) limits your child folder. you need to change your permissions to var or change the owner to www-data:www-data and perms to 775

after some digging, the user needs to switch group with newgrp before doing any operation. to return to the default group on that shell, type exit or Ctrl + D

It returned nothing. But this problem I have on ANY linux distribution or computer. I know it for about 6 years and I just decided to ask about it. I think anyone can replicate it.

It worked. Please put the command in your answer. I don’t understand why it doesn’t work for the first time the group was added to the user. I even rebooted. So, do I have to issue newgrp command everytime I login?

User has a primary group and can have several additional groups. User primary group is set /etc/passwd, ie:

www-data:x:30:40:www-data:/var/www:/usr/sbin/nologin 

says user ‘www-data’ is a member of group id 40.

You can add user to additional groups in /etc/group, but when you create a file, by default system will set user primary group as an owner, not one of additional groups. Some Unixes check for directory group, and if user is a member of this group, new file has a group owner taken from directory, not from user.

So when you create a file, by default you do it as a user ‘monkey’, group ‘monkey’. And since folder is owned by:

  • user ‘www-data’, not by ‘monkey’ — user permissions are not used
  • group ‘www-data’, not by ‘monkey’ — group permissions are also not used
  • ‘other’ permissions are used, and t

Using newgr command you can switch your primary group to one of the additional groups, so effectively set group owner for new file creation.

Using umask command you can tune permissions used for new file creation.

Источник

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