Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
3
votes
2
answers
2600
views
Need write permissions to install themes on Linux Mint 17 "Rebecca" Mate
Just installed Linux Mint 17 "Rebecca" Mate. I'm trying to install a new theme. I've downloaded a couple and their instructions request that contents are copied to /usr/share/themes However, I don't have writing permissions to copy to this folder. I carried out a workaround to basically force the do...
Just installed Linux Mint 17 "Rebecca" Mate. I'm trying to install a new theme.
I've downloaded a couple and their instructions request that contents are copied to
/usr/share/themes
However, I don't have writing permissions to copy to this folder.
I carried out a workaround to basically force the download into /themes, but encountered a fairly obstructive error upon booting wherein the ICE authority file could not be updated. This has since been resolved.
What's a successful method?
mickmau5
(31 rep)
Dec 31, 2014, 01:37 AM
• Last activity: Apr 6, 2025, 03:11 AM
68
votes
6
answers
223717
views
Mounting a squashfs filesystem in read-write
I have a Clonezilla installation on a USB stick and I'd like to make some modifications to the operating system. Specifically, I'd like to insert a runnable script into `/usr/sbin` to make it easy to run my own backup command to make backups less painful. The main filesystem lives under `/live/files...
I have a Clonezilla installation on a USB stick and I'd like to make some modifications to the operating system. Specifically, I'd like to insert a runnable script into
/usr/sbin
to make it easy to run my own backup command to make backups less painful.
The main filesystem lives under /live/filesystem.squashfs
on the USB FAT-32 partition.
How can I mount this read/write on my Linux machine in order to be able to add/remove/change files? I'm running an Ubuntu 12.04 derivative.
Naftuli Kay
(41346 rep)
Jun 21, 2013, 07:57 PM
• Last activity: Sep 14, 2024, 04:42 PM
0
votes
1
answers
125
views
Unable to write dumpcap output to mounted drive
[![enter image description here][1]][1] I managed to automount an exFAT drive with `rw` permissions. The mount point is a directory I made (`/media/usb1`) and the drive itself is named `usb1`. ```lang-shell sudo dumpcap -i eth1 -w /media/usb1/logs -b duration:600 -b files:100 ``` Yet I get this erro...

rw
permissions. The mount point is a directory I made (/media/usb1
) and the drive itself is named usb1
.
-shell
sudo dumpcap -i eth1 -w /media/usb1/logs -b duration:600 -b files:100
Yet I get this error when running:
dumpcap: The file to which the capture would be saved could not be opened: No such file or directory.
I suspect the issue is specifically with writing to the external drive, but this code worked for a while before it seemed to arbitrarily stop.
I'm looking over other resources but I can't find anything related to this specific issue.
Johnny C
(1 rep)
Jan 11, 2024, 05:12 PM
• Last activity: Jan 22, 2024, 03:50 PM
2
votes
2
answers
2043
views
Restrict linux process write permission to one folder
I want a process (and all its potential children) to be able to read the filesystem according to my user profile but I want to restrict that process's write permission to only a set of pre-selected folders (potentially only one). `chroot` seems to act too broadly. Restricting the process to a partic...
I want a process (and all its potential children) to be able to read the filesystem according to my user profile but I want to restrict that process's write permission to only a set of pre-selected folders (potentially only one).
chroot
seems to act too broadly. Restricting the process to a particular part of the filesystem which makes curbersome the need to mount /bin
folders and the like. My process should be able read the content of the filesystem as any normal process I launch.
I could use a docker container and mount a volume but that seems overkill: need to install docker, create an image, launch the container in it, etc...
Is there a way to do something like?:
restricted-exec --read-all --write-to /a/particular/path --write-to /another/particular/path my-executable -- --option-to-the-executable
Some sort of [unveil
](https://man.openbsd.org/unveil.2) but controlled by the calling process and only for write access.
Luke Skywalker
(205 rep)
Feb 27, 2022, 05:51 PM
• Last activity: Nov 14, 2023, 02:39 PM
1
votes
1
answers
2299
views
Unable to write/read from serial port after couple of minutes/hours. Error message: stty: standard input: Inappropriate ioctl for device
I am trying to write and read from serial port at the same time. The purpose of this is to turn on and off a device over a DIO card which is connected to the serial port. While doing these on/off test, I also need to collect some data from light sensors which are also connected to DIO card. Usually...
I am trying to write and read from serial port at the same time. The purpose of this is to turn on and off a device over a DIO card which is connected to the serial port. While doing these on/off test, I also need to collect some data from light sensors which are also connected to DIO card.
Usually the first couple of minutes/hours everything is working as it should. I can send commands to the DIO card, they get executed while at the same time I am able to read the light sensor data. Unfortunately after couple of minutes/hours it stops working and I am not able to send any commands through the port at all.
**Serial port settings:**
I use the following serial port settings:
sudo stty -F /dev/ttyUSB0 115200 cs8 -cstopb -parenb -echo
When I try to send commands in terminal I get the following error message: bash: /dev/ttyUSB0: Permission denied
When i try to read the serial port settings via `stty > $devicesFolder/lightSensor_log.txt
echo $line
idOfMainScript=$(ps -aux | grep -E "\/bin\/bash.+Main_Script\.sh")
if [[ -z $idOfMainScript ]]; then
break
fi
done
printf "adc-loop;" > /dev/ttyUSB0
**3) Test_Scenario.sh**
#!/bin/bash
printf "DO1=1;" > /dev/ttyUSB0
sleep 50
printf "DO1=0;" > /dev/ttyUSB0
apploid
(11 rep)
Nov 8, 2019, 10:39 AM
• Last activity: Jun 3, 2023, 08:51 PM
-1
votes
2
answers
64
views
When io util is relatively high, will Linux read and write hard disks return EIO?
When input/output util is relatively high, will Linux read and write hard disks return EIO?
When input/output util is relatively high, will Linux read and write hard disks return EIO?
yangfan
(1 rep)
Oct 22, 2022, 04:01 AM
• Last activity: Oct 23, 2022, 12:53 PM
1
votes
0
answers
9728
views
mount: /: mount point not mounted or bad option (fresh Gentoo installation)
Just rebooted gentoo install from livecd, and it seems like nothing is writable. On boot I get this error as it tries to remount the root filesystem read/write: mount: /: mount point not mounted or bad option Root filesystem could not be mounted read/write My wifi interface also failed to start, but...
Just rebooted gentoo install from livecd, and it seems like nothing is writable. On boot I get this error as it tries to remount the root filesystem read/write:
mount: /: mount point not mounted or bad option
Root filesystem could not be mounted read/write
My wifi interface also failed to start, but I think I know how to fix it... If the root filesystem worked.
Also here is my /etc/fstab:
dev/nvme0n1p1 /boot vfat defaults 2 0
dev/nvme0n1p5 none swap sw 0 0
dev/nvme0n1p6 / ext4 noatime 0 0
So far I've tried to unmount dev/nvme0n1p6 and remount it as write, but it always gives me /dev/nvme0n1p6 already mounted to /. Any help is appreciated.
J H
(21 rep)
Oct 14, 2021, 04:17 PM
2
votes
1
answers
1901
views
Testing LTO drive with mt and dd
Here are my commands mt -f /dev/st0 rewind dd if=/dev/st0 of=- As I understand it the first command rewinds my tape in `/dev/st0`, and the second command writes contents of `/dev/st0` to `-`. My questions are - Where is `-`? - What is this command doing when it writes the data from the tape to `-`?...
Here are my commands
mt -f /dev/st0 rewind
dd if=/dev/st0 of=-
As I understand it the first command rewinds my tape in
/dev/st0
, and the second command writes contents of /dev/st0
to -
. My questions are
- Where is -
?
- What is this command doing when it writes the data from the tape to -
?
The result of the command is:
dd: writing to '-': No space left on device
1234567+0 records in
1234566+0 records out
140000000000 bytes (141 GB) copied, 14500.9 s, 9.8 MB/s
It appears to me I have written the data to something, but I would like to verify where that data was written.
Is it just reading the tape?
Thanks for the help
JustAn0therL0stTechnician
(33 rep)
Oct 3, 2020, 01:39 PM
• Last activity: Oct 3, 2020, 02:36 PM
2
votes
1
answers
5826
views
checkPermissions Missing write access to /usr/local/lib/node_modules
I tried to install the `npm install pug`, could not because of the permisions, got this: checkPermissions Missing write access to /usr/local/lib/node_modules However im logged in as as root `Linards:~ Berzins$`, as I tried to enable the root user: Linards:~ Berzins$ dsenableroot username = Berzins u...
I tried to install the
npm install pug
, could not because of the permisions, got this:
checkPermissions Missing write access to /usr/local/lib/node_modules
However im logged in as as root Linards:~ Berzins$
, as I tried to enable the root user:
Linards:~ Berzins$ dsenableroot
username = Berzins
user password:
root password:
verify root password:
dsenableroot:: ***Successfully enabled root user.
Any help appreciated.
**UPDATE:**
After suggestion by FarazX below, this is the ooutcome:
Linards:~ Berzins$ ls -lO /usr/local/lib/node_modules
total 0
drwxr-xr-x 8 Berzins staff - 272 1 Oct 21:53 bower
drwxr-xr-x 8 Berzins staff - 272 1 Oct 21:54 foundation-cli
drwxr-xr-x 12 Berzins staff - 408 11 Oct 22:56 gulp
drwxr-xr-x 27 Berzins staff - 918 12 Oct 13:17 npm
Linards:~ Berzins$
Linards Berzins
(33 rep)
Oct 12, 2016, 01:35 PM
• Last activity: Aug 4, 2020, 12:31 PM
0
votes
0
answers
1113
views
Unable to write to a folder on a drive on AiX system
I logged in the server with the below user id. myhost:hkgdb:/wd/user1>id uid=214(user1) gid=321(dba) groups=1(staff) I'm getting the following error while writing to a file: myhost:hkgdb:/wd/user1>touch /backup/myhost/test.touch touch: 0652-046 Cannot create /backup/myhost/test.touch. I see that I h...
I logged in the server with the below user id.
myhost:hkgdb:/wd/user1>id
uid=214(user1) gid=321(dba) groups=1(staff)
I'm getting the following error while writing to a file:
myhost:hkgdb:/wd/user1>touch /backup/myhost/test.touch
touch: 0652-046 Cannot create /backup/myhost/test.touch.
I see that I have good permissions on the folder.
myhost:hkgdb:/wd/user1>ls -ld /backup
drwxrwxrwx 841 root system 31449 May 09 10:25 /backup
myhost:hkgdb:/wd/user1>ls -ld /backup/myhost
drwxr-xr-x 2 user1 dba 3221 Jan 06 2019 /backup/myhost
My operating system details are below:
myhost:hkgdb:/backup/myhost>uname -a
AIX myhost 1 7 000D1F9BD400
Below are the details of the backup drive.
df -gt | grep backup
10.9.90.107:/ifs/data/NAS_BKP 396149.93 384419.14 11730.80 98% /backup
Can you please suggest what could be the issue and how can I resolve it ?
Ashar
(527 rep)
May 10, 2020, 06:48 PM
0
votes
3
answers
5186
views
Can't format USB Stick
Ok so here's what happened. I had been using a USB stick to re-install Windows 10 and quickly reformat my dads laptop. Now I used the existing Windows 10 to create the live USB drive and I guess it write protected the stick. Now I've been trying a bunch of things to get my stick back: - Bootice - Gp...
Ok so here's what happened.
I had been using a USB stick to re-install Windows 10 and quickly reformat my dads laptop. Now I used the existing Windows 10 to create the live USB drive and I guess it write protected the stick.
Now I've been trying a bunch of things to get my stick back:
- Bootice
- Gparted (Format to, Delete)
- Windows Disk Utility
- Linux (Cinnamon?) Disk Utility
- Dispart (clean, recover)
- Windows quick format
So I pretty much am just getting errors
> Unable to format because of I/O Error
>
> Unable to open drive read-write. Drive opened read-only
>
> Unable to format because it's opened read-only
If you have any suggestions on what to do. I have a Linux and a Windows 10 installation so I can try both :)
Nicolas Torres
(111 rep)
Jul 16, 2017, 12:14 PM
• Last activity: Apr 27, 2020, 11:04 PM
0
votes
2
answers
276
views
Read and write to file using bash
Problem statement: 1. Read a file line by line 2. Execute a command on each file 3. Print the line and output of command in another file **Input file (urls.txt):** www.google.com www.yahoo.com www.bing.com **Expected output file (output.csv):** www.google.com,200 www.yahoo.com,500 www.bing.com,404 *...
Problem statement:
1. Read a file line by line
2. Execute a command on each file
3. Print the line and output of command in another file
**Input file (urls.txt):**
www.google.com
www.yahoo.com
www.bing.com
**Expected output file (output.csv):**
www.google.com,200
www.yahoo.com,500
www.bing.com,404
**Script I have so far**
while IFS= read -r line
do
curl -LI "$line" -o /dev/null -w '%{http_code}\n' -s
>> output.csv
done < urls.txt
*not an expert in bash scripting. just a beginner. any help is much appreciated. Thank you. :)*
Jignesh144
(1 rep)
Mar 21, 2020, 05:56 PM
• Last activity: Mar 22, 2020, 03:25 AM
0
votes
0
answers
58
views
Installed a steam game through one user but no write permissions from other?
I downloaded CS:GO steam in Linux Mint Tricia 19.3 through a standard user (spectra) and an administrator (darkguy) (tried both ways). Installed directoty :`/mnt/227ad523-2b06-456b-908f-fbda67a95046/Steam Library` Currently it is installed through spectra (group-spectra), and most of the files are o...
I downloaded CS:GO steam in Linux Mint Tricia 19.3 through a standard user (spectra) and an administrator (darkguy) (tried both ways). Installed directoty :
Currently it is installed through spectra (group-spectra), and most of the files are owned by spectra, so darkguy has no write access on them. (Even though darkguy has read access and steam can find already installed game files).
Is it supposed to be like this?
How do I correct this? (Individually changing the files is beyond impossible). Just migrated from Windows.
/mnt/227ad523-2b06-456b-908f-fbda67a95046/Steam Library
Currently it is installed through spectra (group-spectra), and most of the files are owned by spectra, so darkguy has no write access on them. (Even though darkguy has read access and steam can find already installed game files).
Is it supposed to be like this?
How do I correct this? (Individually changing the files is beyond impossible). Just migrated from Windows.
DarkGuy10
(1 rep)
Feb 23, 2020, 10:39 PM
• Last activity: Feb 24, 2020, 12:14 AM
3
votes
1
answers
894
views
Can I mount ext4 without writing the last mountpoint to the filesystem?
I have an old `ext4` disk partition that I have to investigate without disturbing it. So I copied the complete partition to an image file and mounted that image file while continuing my investigation. Now while I do not write to the mounted filesystem, I do have to mount it with read/write access, b...
I have an old
ext4
disk partition that I have to investigate without disturbing it. So I copied the complete partition to an image file and mounted that image file while continuing my investigation.
Now while I do not write to the mounted filesystem, I do have to mount it with read/write access, because one of the programs makes assumptions on what I intend to do, and requires write access, even though I do not intend to write to it. You know the kind of 'smart' programs.
Now the problem is that, when mounting an ext4 filesystem read/write, the last mount point is written into the filesystem itself, i.e. the mount command changes my image file, including file access time and file modification time. That is annoying for a lot of other reasons. I cannot find an option in [mount(8)
](https://linux.die.net/man/8/mount) nor in [ext4(5)
](http://man7.org/linux/man-pages/man5/ext4.5.html) to avoid this.
Is there another way to mount with read/write access, without the mount command writing to the filesystem?
db-inf
(333 rep)
Feb 17, 2020, 03:59 PM
• Last activity: Feb 17, 2020, 05:26 PM
20
votes
5
answers
156282
views
USB Disk Read-only, cannot format - Turn off write-protection
I have a USB disk which does not allow me to format/mount/unmount or created partitions on it. ![enter image description here][1] Using `dmesg | tail` gives me the following result: ![enter image description here][2] I found this [post on AskUbuntu][3] and tried using the accepted answer. I get the...
I have a USB disk which does not allow me to format/mount/unmount or created partitions on it.
Using
I found this post on AskUbuntu and tried using the accepted answer. I get the following result, but it is still read-only:

dmesg | tail
gives me the following result:


umount
doesn't work. Says umount: /dev/sdc: not mounted
Any help on how to remove the write protection will be much appreciated.
kRiZ
(301 rep)
Jul 15, 2015, 10:51 AM
• Last activity: Nov 19, 2019, 10:02 PM
3
votes
0
answers
797
views
Can't set filesystem to rw after crash
My Mint crashed twice yesterday. Googling for frozen system with flashing caps and scroll-lock LEDs made me believe it was a hardware problem. I carefully cleaned everything, and the hardware seems to work ok again - I had no more crashes. Today I tried downloading a file and I got a pop-up saying t...
My Mint crashed twice yesterday. Googling for frozen system with flashing caps and scroll-lock LEDs made me believe it was a hardware problem. I carefully cleaned everything, and the hardware seems to work ok again - I had no more crashes.
Today I tried downloading a file and I got a pop-up saying the disk is write-protected. Also,
apt-get update
returns me a lot of errors about "read-only filesystem".
I tried this and this . Here are the outputs:
`# blockdev -v --setrw /dev/sdb
set read-write succeeded.`
`# mount / -o remount,rw
mount: cannot remount /dev/sdb6 read-write, is write-protected`
`# hdparm -r 0 /dev/sdb
/dev/sdb:
setting readonly to 0 (off)
readonly = 0 (off)`
`# mount / -o remount,rw
mount: cannot remount /dev/sdb6 read-write, is write-protected`
I tried both blockdev
and hdparm
using /dev/sdb
and /dev/sdb6
, and running # echo $?
after each of them always returns 0
, indicating success, but nothing seems to work.
Also, my /home
folder is at /dev/sdb7
and I can write files normally to it.
Here is the output for # fdisk -l
Disk /dev/sdb: 931,5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0005683d
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 976963584 1953523711 976560128 465,7G 7 HPFS/NTFS/exFAT
/dev/sdb2 2046 976962885 976960840 465,9G 5 Extended
/dev/sdb5 2048 2000895 1998848 976M 82 Linux swap / Solaris
/dev/sdb6 2002944 41062399 39059456 18,6G 83 Linux
/dev/sdb7 41064448 976962885 935898438 446,3G 83 Linux
The /dev/sdb1
is a NTFS partition I made to be accessible from Windows, which is at /dev/sda
.
Any ideas on how I could fix this? Thanks for your patience.
Bruno Behnken
(31 rep)
Aug 21, 2017, 04:13 PM
• Last activity: Oct 21, 2019, 10:23 AM
2
votes
0
answers
268
views
Why the user root doesn't have "w" permission of its home directory?
I'm on Oracle Linux 7.6. The user `root` apparently has write permission for its own home directory `/root`. But why the mode bits of `/root` shows `dr-xr-x---.` instead of `drwxr-x---.`? root:[~]# cat /etc/*release* Oracle Linux Server release 7.6 NAME="Oracle Linux Server" VERSION="7.6" ID="ol" VA...
I'm on Oracle Linux 7.6. The user
root
apparently has write permission for its own home directory /root
. But why the mode bits of /root
shows dr-xr-x---.
instead of drwxr-x---.
?
root:[~]# cat /etc/*release*
Oracle Linux Server release 7.6
NAME="Oracle Linux Server"
VERSION="7.6"
ID="ol"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.6"
PRETTY_NAME="Oracle Linux Server 7.6"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:6:server"
HOME_URL="https://linux.oracle.com/ "
BUG_REPORT_URL="https://bugzilla.oracle.com/ "
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.6
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.6
Red Hat Enterprise Linux Server release 7.6 (Maipo)
Oracle Linux Server release 7.6
cpe:/o:oracle:linux:7:6:server
root:[~]#
root:[~]# pwd
/root
root:[~]# ls -lad .
dr-xr-x---. 9 root root 4096 Aug 16 21:37 .
root:[~]#
root:[~]# cd /
root:[/]#
root:[/]#
root:[/]# getfacl root
# file: root
# owner: root
# group: root
user::r-x
group::r-x
other::--x
root:[/]#
Just a learner
(2022 rep)
Aug 16, 2019, 01:43 PM
• Last activity: Aug 16, 2019, 01:54 PM
0
votes
0
answers
868
views
HPE MSA-2050, FC extremely slow read/write
There's HP DL380 Gen10 server (dual Xeon Silver 4110 2.10GHz, 128Gb RAM, qlogic qla2xxx ) running debian 9.8, acting as database sever (percona server-5.6.43-84.3). Mysql data directory is connected over FC to HPE MSA-2050 (raid 10 of 14 SAS HDD 900Gb 15K, one disk group, one pool, one volume of 2.5...
There's HP DL380 Gen10 server (dual Xeon Silver 4110 2.10GHz, 128Gb RAM, qlogic qla2xxx ) running debian 9.8, acting as database sever (percona server-5.6.43-84.3).
Mysql data directory is connected over FC to HPE MSA-2050 (raid 10 of 14 SAS HDD 900Gb 15K, one disk group, one pool, one volume of 2.5 Tb of ext4) on speed 16Gbps. One optical link is used (no muptipath).
Next things happen: when testing random read/write speed, using
sysbench
, the speed is about 10/8 M/s which is extremely slow. So, mysql I/O is also on same speed.
But with sequential read/write tests speed grows to 800/600 M/s. Same speed is when using dd
to write data, when doing copy operation or any sequentional file operations.
Tried different options of pool and volumes in HPE MSA - no luck.
SAN volume is mounted with options /dev/sde1 on /mysql-data type ext4 (rw,noatime,stripe=256,data=ordered)
With this test:
`sysbench --test=fileio --file-total-size=150G prepare
sysbench --test=fileio --file-total-size=150G --file-test-mode=rndrd --max-time=100 --max-requests=0 run`
result is:
Number of threads: 1
Initializing random number generator from current time
Extra file open flags: (none)
128 files, 1.1719GiB each
150GiB total file size
Block size 16KiB
Number of IO requests: 0
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random read test
Initializing worker threads...
Threads started!
File operations:
reads/s: 561.86
writes/s: 0.00
fsyncs/s: 0.00
Throughput:
read, MiB/s: 8.78
written, MiB/s: 0.00
General statistics:
total time: 100.0053s
total number of events: 56191
Latency (ms):
min: 0.01
avg: 1.78
max: 111.23
95th percentile: 11.65
sum: 99924.80
Threads fairness:
events (avg/stddev): 56191.0000/0.00
execution time (avg/stddev): 99.9248/0.00
When startng with sysbench --test=fileio --file-total-size=150G --file-test-mode=seqrd --max-time=100 --max-requests=0 run
result is:
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Extra file open flags: (none)
128 files, 1.1719GiB each
150GiB total file size
Block size 16KiB
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing sequential read test
Initializing worker threads...
Threads started!
File operations:
reads/s: 31642.04
writes/s: 0.00
fsyncs/s: 0.00
Throughput:
read, MiB/s: 494.41
written, MiB/s: 0.00
General statistics:
total time: 100.0008s
total number of events: 3164351
Latency (ms):
min: 0.00
avg: 0.03
max: 32.77
95th percentile: 0.06
sum: 98523.42
Threads fairness:
events (avg/stddev): 3164351.0000/0.00
execution time (avg/stddev): 98.5234/0.00
The similar results with random write and sequentional write.
What can be wrong?
Someone
(303 rep)
May 22, 2019, 02:02 PM
1
votes
0
answers
648
views
A more permanent change to readonly squashfs mounted /etc
I have an IP-camera with the BusyBox v1.22.1 operating system that has some accounts either without or with public known passwords that I want to change to make it more secure. I have managed to log in to the root account via telnet but could initially not change password or users. The filesystem is...
I have an IP-camera with the BusyBox v1.22.1 operating system that has some accounts either without or with public known passwords that I want to change to make it more secure. I have managed to log in to the root account via telnet but could initially not change password or users. The filesystem is squashfs and except the /tmp and /home directories all other direcories are mounted as read only.
After some searches on the internet I found a way to change the contents of files in the /etc directory where the password and shadow files are stored. I used bind-mounting of a copy of the /etc directory in the /home directory as the /tmp directory was nor persistent during reboot. /tmp is probably just stored in ram memory. I used the following command:
cp -a /etc /home/tst && mount --bind /home/tst/etc /etc
but the bind-mount is not persistent during reboot so I need to find a file that is exceuted in the boot process that does the binding (eg where I can put the "mount --bind /home/tst/etc /etc" command) as the files in the /home directory is not affected by reboot.
What file would be good to have the mount --bind command in, preferably a file in the /home directory that is executed in the last part of the boot process so it is not overridden by some other command?
fri_tid
(11 rep)
Mar 4, 2019, 08:32 PM
• Last activity: Mar 7, 2019, 10:34 AM
2
votes
1
answers
1654
views
/sys/kernel/debug/dynamic_debug/control not writable, follow xhci_hcd debug guide
I want to [follow this tutorial][1]. But I can't write to `/sys/kernel/debug/dynamic_debug/control`- or `[debugfs]/dynamic_debug/control`-file as suggested by the guide, even tough I am `root`, the special filesystem is mounted `rw` and the `control`-file has `rw`-mode for `root`. How can I make the...
I want to follow this tutorial . But I can't write to
/sys/kernel/debug/dynamic_debug/control
- or [debugfs]/dynamic_debug/control
-file as suggested by the guide, even tough I am root
, the special filesystem is mounted rw
and the control
-file has rw
-mode for root
.
How can I make the control
-file writable?
I also have another side question. I will ask it, if I may:
All lines in the control
-file look like this:
# filename:lineno [module]function flags format
init/main.c:782 [main]initcall_blacklisted =p "initcall %s blacklisted\012"
The guide asks me to add the following line:
echo 'module xhci_hcd +p' > /dynamic_debug/control
So is this the way to go? Or is there something _terribly wrong_ with writing the above line to the control
-file, that may break my system or anything?
aiutopia.dev
(603 rep)
May 9, 2018, 06:52 PM
• Last activity: Oct 17, 2018, 11:03 PM
Showing page 1 of 20 total questions