@Rick_C137
@programming.devHi,
I would like to change the owner of a directory on the sdcard
/sdcard/aDirectory
I have a terminal installed on my Android 10 (LineageOS 17)
com.android.terminal
sudo
is not present so I use su
and it works.
su
#Terminal was granted Superuser rights
cd /sdcard
chown 10:10 aDirectory
#I don't get any error message.
stat aDirectory
#Uid (0/root)
So the owner stay root no matter what I'm doing, any ideas ?
Hi,
I created another user on my custom rom Android (aka Multiple users)
Unfortunately when doing so the system do not adapt the permission of the sdcard and some other directory, thus the new user can't access them :/
So I wanted to "remote" terminal into my android device from my computer.
How are you achieving this ? ( without 3thparty apps please ! )
Thanks.
Hi everyone,
Is there somewhere a list of all the changes made compared to Firefox ?
edit:
Sorry if it's been already asked over here, but it seem that Lemmy do not provide a search within a Community 😮
no, actually we can, there isn't a shortcut to make such a search. and no ability to limit the search to the titles..
*Wubba Lubba dub-dub*
cross-posted from: https://programming.dev/post/18360806
Hi everyone,
I would like to enable Cross-Origin Resource Sharing on my Nginx server. for few origins (cors requestor)/domains.
I've found this article https://www.juannicolas.eu/how-to-set-up-nginx-cors-multiple-origins that is nice, but not complete and on my browser seem really hard to read due to the layout 🤮
So I've opened a CodeBerg git repository for the good soul that want to perfect this piece of code the allow the most of use to use CORS with Nginx.
https://codeberg.org/R1ckSanchez_C137/BestOfxxx/src/branch/main/Nginx/CORS_MultiDomains.py
If you don't want to create an account on codeberg feel free to post your code here !
server { # Server map "$http_origin" $cors { # map in Nginx is somewhat like a switch case in a programming language. default ''; #Seem to set $cors to '' empty string if none of the follwing rexeg match ? "~^https:\/\/([\w-_\.]+\.)?example.com$" "$http_origin"; #regex domain match # ~ mean I suppose the string is RegEx ? # Need to come with a RegEx expression that match https://anything.example.com[optional ports and Query string ?X=Y] "~^https:\/\/([\w-_\.]+\.)?example2.com$" "$http_origin"; #regex domain match } location /static { # if preflight request, we will cache it if ($request_method = 'OPTIONS') { add_header 'Access-Control-Max-Age' 1728000; #20 days add_header 'Content-Type' 'text/plain charset=UTF-8'; add_header 'Content-Length' 0; return 204; #https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204 } if ($cors != "") { add_header 'Access-Control-Allow-Origin' "$cors" always; # <-- Variable $cors add_header 'Access-Control-Allow-Credentials' 'true' always; add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always; add_header 'Access-Control-Allow-Headers' 'Accept, Authorization, Cache-Control, Content-Type, DNT, If-Modified-Since, Keep-Alive, Origin, User-Agent, X-Requested-With' always;} # configuration lines... } } }
Hi,
I got FileA
that have 640
a getfacl FileA
give me
# file: FileA
# owner: me
# group: me
user::rw-
user:aUser:r--
group::r-x #effective:r--
mask::r--
other::---
So it's give me the expected...
but when I do
chmod 600 aFile
getfacl aFile
...
user:aUser:r-- #effective:---
...
mask::---
...
Why suddenly aUser
lost his ability to read the file !?!?!
Hi,
I've set for a directory the following
setfacl -dm u:aUser:r aDirectory
#set new files to be readable by aUser
cp ~/Desktop/aFile.txt /xx/xx/xx/aDirectory
getfacl aFile.txt #the copied one
# file: aFile.txt
# owner: me
# group: me
user::rwx
user:aUser:r--
group::r-x
mask::rwx
other::rwx
So indeed we see the aUser
got r--
but
stat aFile.txt
return
(0777/-rwxrwxrwx) #!!!!
is that normal !!!!???
Thanks.
Hi,
I've noticed something quite odd, but I don't know if the problem come from Linux itself or nginx..
In order to grant nginx access to a directory let say your static
see: https://stackoverflow.com/questions/16808813/nginx-serve-static-file-and-got-403-forbidden
These parent directories "/", "/root", "/root/downloads" should give the execute(x) permission to 'www-data' or 'nobody'. i.e.
but it seem not only the direct parent need to be given XX5 but all the chain
for example
example
└── sub1
└── sub2
└── static
it seem you need to set allow others
to read and execute 5
all the parents example, sub1, sub2
Why is that !?? I've found it so akward and unsecure !
is there a workaround ?
Thanks.
Hi,
I'm confuse about those mandatory legal notices that governments impose for websites..
Before going further I invite you to read:
A Declaration of the Independence of Cyberspace
and
Discourse on Voluntary Servitude1 \
From all the articles2 that I read about the mandatory notice to display for website none of them reference the URL of their claim !! / of the legal text !! WTF3
Internet is by essence world wide, and when reading all those legal requirement it's seem that you should display notices for EVERY country !
it's seem also that if you own a private website, just for your own or family use, like for example a web file hosting services. (NextCloud etc..) You should comply with the same requirement that are asked for company ! again... WTF !
Also I don't understand, why make mandatory those notices...(beside the scam (money) ) , I'll come back to this below.
So there is no sense to ask everyone that extra heavy burden. The only advantage is for law firm (and those cookies related firm) that make a profit out of it. I heard in my entourage peoples that had pay thousandth of $$ to generate those text, keep up to date etc.. even for small website.
Thanks...
::: spoiler CrossPosted on: https://lemmy.ml/post/15583047 :::
https://en.wikipedia.org/wiki/Discourse_on_Voluntary_Servitude
https://archive.org/details/0000-00-00-00-etienne-de-la-boetie-00_202201/1548-00-00_Discourse%20on%20Voluntary%20Servitude_1942_org/mode/2up
-- ↩
https://elementor.com/blog/website-legal-requirements https://www.websitepolicies.com/blog/legal-requirements-for-websites ↩
if you have those links feel free to share ! ↩
The one that you are using now with the domains scam. A future internet might be using TOR or GNU Name System ↩
cross-posted from: https://programming.dev/post/10497245
Hi,
For websites I've always restricted
username
to use Apostrophe'
and"
and some times even space. If a website necessitate special character then I prefer to create an additional DB field ~
DisplayName
.It's easier to forbid the use of Apostrophe, otherwise you will have to escape also your search query to match what has been recorded in the DB.
On the topic I've this https://security.stackexchange.com/questions/202902/is-single-quote-filtering-nonsense
But if you have better documentation feel free to share :)
Thanks