permission – Can I lock an external hard drive?

I have two identical hard drives. One is the one I will keep updating frequently, the other will be a backup that I update less often.

In order to avoid confusion, I would like to “Lock” the second hard drive the same way you would lock a folder from its “Info” panel, here:

enter image description here

However, for drives, this option is not present:

enter image description here

Is there a simple, quick, Mac OS native way to make the drive locked to prevent mixing them up?

I tried to set permission to “Read Only” but it still allowed me to make changes on the drive (like move a folder inside another).

hard drive – Can’t read/write via `dd`: got /dev/disk2: Permission denied

I can’t do anything via dd with my disks.

Got Error:

dd: /dev/disk2: Permission denied


  1. Check disks:
    enter image description here

  2. unmount:
    diskutil unmountDisk /dev/disk2
    enter image description here

Then want to backup disk to the mac:
sudo dd bs=4m if=/dev/disk2 of=/Users/pk/Desktop/PiOS_full_root.img

Got error:

enter image description here

What causes this problem? why dd sends this error from sudo?


there are similar topics around. But nothing works.

  • I check system preferences and gave full disk access to iTerm2 (doesn’t help)
  • unmount via diskutil unmountDisk and diskutil unmount
  • Change USB ports (many people said because of the physical lock of sd card.

Any suggestions, what to check, and how to fix it?

How hard is it to hack the JWT HS256 algo?

By convention, I see a lot of folks using this approach to generate a private key from a nodejs console:


But considering I could input other values besides 0-9 and A-Z, I wondered if my key would be more secure if I used other non hex-only characters?

Second, if my key is 64 bytes for the HS256 algo., how much time would it take an attacker to brute force the signature? My JWTs are only valid for 15 minutes, but that doesn’t stop an attacker from logging in, grabbing an access-token and brute forcing it.

My JWTs maintain 3 claims that I don’t encrypt — the email address of the user, the user’s ID (which never changes) and a boolean value. I was considering appending to my key the hash value of the user’s ID so that brute forcing the key (if successful) would only yield the password for that one user as the attacker would likely not realize that I appended the hash of the user’s ID. Is this a good strategy?

I’m just concerned that JWTs aren’t as secure as session IDs in a cookie as I can control how many requests an attacker can make from my endpoints but can’t control a brute force against an offline verify.

linux – How to share GCP virtual machine hard disk’s files publicly

I have a file system directory(files and folders) in a google cloud platform virtual machine as a mounted disk. I wanted those files should share across all other applications to access those files.

VM OS – Debian 9

I’ve tried:

Thought using Nginx server to share the files like – http:// IP Address/path/to/file.pptx
configuration file

server {
    listen 8080 default_server;
    listen (::):8080 default_server;
    server_name <IP Address>;

    #charset koi8-r;
    #access_log  /var/log/nginx/host.access.log  main;

    location / {
    root   /<mounted file path>;
        index  index.html index.htm;
    try_files $uri $uri/ =404;


Things are working as I expected, getting 404 error when try to access using this URL – http:// IP Address/path/to/file.pptx

Actually I have no clue how to access those files. I would appreciate it if someone helps me out with a right solution.

Can’t See External Hard Drive Files Anymore After Installing A Windows 10 Boot

I wanted to fix my old laptop and for some reason I thought it would be okay to install a Windows 10 Boot onto my external hard drive. After installing it, I was unable to see all of the files I had on there. I was wondering if there is any way to reverse this or recover my files. It’s a 2TB WD Elements Hard Drive and was nowhere near to full yet. I have included an image below of what it looks like on explorer.

View post on

View post on

windows – Files and folders on the Hard disk became not accessible

Trying to open or copy the files in windows explorer – I’m getting an error message: “Location is not available” Folder is not accessible, the file or directory is corrupted and unreadable.
The files are also not accessible in WORD.
Later on, Some of the folders returned to be available / accessible.
There are 2 internal physical Hard disks in my laptop, and This is only happening on Drive D (drive C is OK).
Check Disk says no problem.
No virus found. (LENOVO ideapad330).
Is it possible to recover the files and folders that “disappear”?
How can I stop this from happening again?

composition – What to look out for when shooting in direct sunlight, causing hard shadows and shiny patches on water?

I am aware that this question might be labelled as off-topic, but the issue bothers for some days now, and I figured my best bet to get an answer is here on this site.

Whenever I look at pictures I have taken on bright, sunny days, I feel like shiny patches on water or hard shadows enhance the perceived brightness of the picture. Often to a point where it feels exhausting to look at.

See this picture I took in Inverness as an example:
enter image description here

Are such conditions something to avoid if I am still a beginner? What to look out for?

hard drive – Failed to extend disk with free space

I have a problem with extending my partition with newly added free disk space on cloud hosting.

fdisk /dev/sda > p:

Disk /dev/sda: 10 GiB, 10737418240 bytes, 20971520 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: 0x00025bd3

Device     Boot    Start      End Sectors  Size Id Type
/dev/sda1  *        2048   499711  497664  243M 83 Linux
/dev/sda2         499712  2500607 2000896  977M 82 Linux swap / Solaris
/dev/sda3        2502654 10485759 7983106  3.8G  f W95 Ext'd (LBA)
/dev/sda4       10485760 16777215 6291456    3G 8e Linux LVM
/dev/sda5        2502656 10485759 7983104  3.8G 8e Linux LVM

Partition table entries are not in disk order.


sda                    8:0    0   10G  0 disk
├─sda1                 8:1    0  243M  0 part /boot
├─sda2                 8:2    0  977M  0 part (SWAP)
├─sda3                 8:3    0    1K  0 part
├─sda4                 8:4    0    3G  0 part
│ └─oktawave_Vg-main 252:0    0  6.8G  0 lvm  /
└─sda5                 8:5    0  3.8G  0 part
  └─oktawave_Vg-main 252:0    0  6.8G  0 lvm  /
sr0                   11:0    1 1024M  0 rom

When I try to create new parition from new 2GB free space it fails with an error:
All primary partitions are in use

I want to extend oktawave_Vg group.

And let me just say I’m not very good with linux, so detailed answer would be greatly appreciated. Thanks!

Format hard drive can affect to her timelife?

Hi friends,

I need format hard drive in one server for re-install some things, I need know:

If I format per second time the SSD hard drive and reinstall OS, can broke or affect her time life?.

I know that the write/read operations will affect the SSD in some years but format and reinstall OS this SSD?.

Thank you very much. Have nice day!

reference request – Is realization of unit disk graphs hard?

It is known that recognizing a unit disk graph is NP-hard (1).

However, the paper does not mention how hard is the realization problem.

I have looked up several references (2)(3)(4). None of the papers answer whether the following problem is NP-hard:

Given a unit disk graph $G = (V,E)$, find a configuration of a set
$mathcal{D}$ of disks, such that the intersection graph
$G(mathcal{D})$ of $mathcal{D}$ is isomorphic to $G$.

The difference between this problem and the recognition problem is that the input of this problem is guaranteed to be a unit disk.

Is there any study that shows the complexity of the above problem? I expect it to be NP-hard, but I am yet to find a full proof.