Why does root get "Permission denied" when trying to create this folder?
152
The answer is right there in the lsattr
output:
# lsattr ..
----i--------e-- ../web2
The folder is immutable, even by root.
Related videos on Youtube
Author by
octavemirbeau
Updated on September 18, 2022Comments
-
octavemirbeau over 1 year
I'm building a small webshop and I have the problem that I can't insert multiple order rows to a specific order due to the primary key constraint. How can I get around this? Out of convenience I would like to have the id autoincremented...
CREATE TABLE order ( id INT NOT NULL AUTO_INCREMENT, number INT, productid VARCHAR(15), customerid INT, created TIMESTAMP DEFAULT CURRENT_TIMESTAMP, updated TIMESTAMP DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, deleted TIMESTAMP DEFAULT NULL, ordered TIMESTAMP DEFAULT NULL, sent TIMESTAMP DEFAULT NULL, PRIMARY KEY (id), FOREIGN KEY (productid) REFERENCES product(produktid), FOREIGN KEY (customerid) REFERENCES customer(id) ) ENGINE INNODB CHARSET utf8 COLLATE utf8_swedish_ci;
-
sticky bit about 4 yearsYou'd typically have another table linking the products and their quantity to an order.
-
Gordon Linoff about 4 yearsWhat does your insert look like?
-
danblack about 4 yearsRecommend "INT UNSIGNED" for AI values, you may was well get the full range.
-
-
kos about 9 yearsHow does one deal with that by the way?
-
muru about 9 years@kos use
chattr
to remove the immutability attribute. -
heemayl about 9 years@kos: You need
chattr -i file