Thanks all for your input !
So yes /sdcard
was /storage/emulated/0
and it's a real sd-card.
That was indeed formatted as FAT
, I reformatted into EXT4
(from a desktop Linux)
put the SD-card back into the phone and started the phone.
Ive tried (in the phone)
su
chmod 777 /storage/emulated/0 #yes it's still mounted as emulated !
stat /storage/emulated/0
#...
#Access: (0771)
#....
So I'm still blocked... any ideas ?
Thanks.
Hi,
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.
```bash 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 ?
I've found the most simple way (for my case)
adb shell 'a command'
example
adb shell ls /
Thank you all for your input.. but it seem my question is still not fully answered...
let me rephrase, I'm not looking to have a GUI to transfer files, but I would like to execute terminal command remotely (from my computer) to my android phone. Like SSH
.
So I've read that I can install a SSH
server on my android phone.. (If you know some's (FLOSS), I'm all ears)
Or if you know a better way than SSH
I'm all ears too.
Thanks.
I've found
#container > div:not(div.barfoo)
seem to do the trick..
Hi everyone,
I have something like this
```html <div id="container">
<div> <div class="foobar"></div> </div>
<div> <div class="foobar"></div> </div>
<div> <div class="foobar"></div> <div class="barfoo"></div> </div>
<div> <div class="foobar"></div> </div>
<div> <div class="foobar"></div> </div>
<div> ```
I would like to select all the #container > div
(the childs of container)
that do not have a div.barfoo
in their childs.
is it possible with CSS ?
I'm at
css #container> div :not(div.barfoo) {}
but this is not working, and will select anyway #container > div > div
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 !
>
> nginx > 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... > > } > } > > } >
>
>
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 !
>
> nginx > 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 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 \ and \ https://codeberg.org/R1ckSanchez_C137/BestOfxxx/issues \
If you don't want to create an account on codeberg feel free to post your code here !
```nginx 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...
} }
} ```
setfacl -m m:r aFile
#re set the mask
solve the problem, but the question is: why the F**** this is happening !?
Hi,
I got FileA
that have 640
a getfacl FileA
give me
```txt
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
bash chmod 600 aFile getfacl aFile
txt ... user:aUser:r-- #effective:--- ... mask::--- ...
Why suddenly aUser
lost his ability to read the file !?!?!
Update, this is only happening when I copy files from a ~SMB share... :'(
Otherwise it's correct...
Hi,
I've set for a directory the following ```bash 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
txt
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
bash stat aFile.txt
return
txt (0777/-rwxrwxrwx) #!!!!
is that normal !!!!???
Thanks.
Proxmox seem powerfull
It's a Type1, not Type2
https://en.wikipedia.org/wiki/Hypervisor#Classification
Thank you all !
Indeed setting execute
perm on example, sub1, sub2, static
The program/user have now access to the directory.
In order words all the parents directory need at least execute
in order to have access in the targeted directory...
Now I gave 751 for static. Meaning than others (here nginx) cannot list the files within. But never the less it works
the static files are appearing when requested (HTTP) but forbidding nginx to list the directory is changing something ? (performance/security)
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
bash 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.
I wanted to have a default server
that catch ~wrong DNS query to the server
Solution
I don't know how to link to my previous lemmy post, so here it is again
server {
listen 443 ssl;
server_name _;
ssl_certificate /etc/nginx/ssl/catchall.crt;
ssl_certificate_key /etc/nginx/ssl/catchall.key;
error_page 404 /404_CatchAll.html;
# Everything is a 404
location / {
return 404;
}
location /404_CatchAll.html {root /var/www/html/;}
}
The full working code:
server {
listen 443 ssl;
server_name _;
ssl_certificate /etc/nginx/ssl/catchall.crt;
ssl_certificate_key /etc/nginx/ssl/catchall.key;
error_page 404 /404_CatchAll.html;
# Everything is a 404
location / {
return 404;
}
location /404_CatchAll.html {root /var/www/html/;}
}
ok I've found something that ~works !
server {
listen 443 ssl;
server_name _;
ssl_certificate /etc/nginx/ssl/catchall.crt;
ssl_certificate_key /etc/nginx/ssl/catchall.key;
error_page 404 /404.html; #at /var/www/html/
location /404.html {internal;}
return 404;
}
so i get the default 404 html from nginx. but not the one that I specified error_page 404 /404.html;
any ideas ?
line 5 you mean ?
error_page 404 /404.html; #this one ?
Hi,
You might be aware that if a DNS request point your nginx server.
and this later do not have a server
rule for it , nginx will server anyway the first server found in your config file, WTF !
So I've found https://stackoverflow.com/a/23281442
```nginx server { listen 80 default_server; server_name everythingelse;
error_page 404 /404.html;
Everything is a 404
location / { return 404; #return the code 404 }
link the code to the file
location = /404.html { #EDIT this line to make it match the folder where there is your errors page #Dont forget to create 404.html in this folder root /var/www/nginx/errors/; } } ```
But this is not working !
I made one of my domain pointing to this nginx server, and he still server another site aka server
For httpS for http nothing appear..
Thanks.
cross-posted from: https://programming.dev/post/13465911
> 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 Servitude[^1] \
>
> From all the articles[^2] that I read about the mandatory notice to display for website none of them reference the URL of their claim !! / of the legal text !! WTF[^links]
>
> 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.
>
> - If you want to buy something off a website, and this later do not mentions any legal address , contact info and so on, the responsibility to buy or not should be only yours. (For example, will you buy a yogurt in the supermarket if there were no brand, contact info on the packing or bill ?)
> - if the state want to censor "regulate" a website on the old internet[^OI] there is plenty of way to know who is the author or at the very least where is it hosted..
> - if a website use/distribute a copyrighted© elements. The right holder can do/contact in the following order:
> - check the website for contact (if any)
> - check the DNS record
> - check the hosting
> - contact the owner of the IP (IP are leased by company../ ISP )
>
>
> 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.
>
> - If you think those legal notice are a good thing please do not hesitate to motivate your answer.
> - If you have any good links about it, feel free to share.
> - What are you doing your self on website of customer and/or for your private websites ?
> - if you know a Lemmy community worth to share this post, step forward.
>
> Thanks...
>
> [^1]: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 \
> --
> [^2]:https://elementor.com/blog/website-legal-requirements
> https://www.websitepolicies.com/blog/legal-requirements-for-websites
> [^OI]:The one that you are using now with the domains scam. A future internet might be using TOR or GNU Name System
>
> [^links]: if you have those links feel free to share !
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 Servitude[^1] \
From all the articles[^2] that I read about the mandatory notice to display for website none of them reference the URL of their claim !! / of the legal text !! WTF[^links]
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.
- If you want to buy something off a website, and this later do not mentions any legal address , contact info and so on, the responsibility to buy or not should be only yours. (For example, will you buy a yogurt in the supermarket if there were no brand, contact info on the packing or bill ?)
- if the state want to
censor"regulate" a website on the old internet[^OI] there is plenty of way to know who is the author or at the very least where is it hosted.. - if a website use/distribute a copyrighted© elements. The right holder can do/contact in the following order:
- check the website for contact (if any)
- check the DNS record
- check the hosting
- contact the owner of the IP (IP are leased by company../ ISP )
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.
- If you think those legal notice are a good thing please do not hesitate to motivate your answer.
- If you have any good links about it, feel free to share.
- What are you doing your self on website of customer and/or for your private websites ?
- if you know a Lemmy community worth to share this post, step forward.
Thanks...
CrossPosted on:
https://lemmy.ml/post/15583047
[^1]: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 \ -- [^2]:https://elementor.com/blog/website-legal-requirements https://www.websitepolicies.com/blog/legal-requirements-for-websites [^OI]:The one that you are using now with the domains scam. A future internet might be using TOR or GNU Name System
[^links]: if you have those links feel free to share !
Something worth reading regarding Systemd https://www.devuan.org/os/announce/ Cheers.
Hi,
Unfortunately I need to register a domain name for the "old" Internet. So this one with the domain name scam[^DomainScam] and so on..
So which registrar would you recommend that is the closed regarding the FLOSS / GNU philosophy ?
And then I hope the world, will migrate to something better than this WWW scam and I could get rid of this domain..
Thanks.
[^DomainScam]: - https://www.namepros.com/threads/is-the-domain-industry-like-a-ponzi-scheme.725672 - https://www.w3.org/2014/strint/papers/65.pdf - https://www.gnunet.org/en - https://www.torproject.org - https://youbroketheinternet.org
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
>
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
Thank you all for your quick reactions !!
To summarize if I want to use the PDF built-in signing I will need to convert my OpenPGP into a X.509 cert otherwise I can simply use the OpenPGP file signing
I want to stick to the UNIX Philosophy especially:
Write programs that do one thing and do it well.
So I will use the OpenPGP signing tool :)
Thanks !
Hi everyone,
I was wondering if you know a way to use the generated OpenPGP key created trough Thunderbird to sign PDF's ?
(Devuan distro)
Thanks.
You can interact with the HTML DOM with Python !!!!!
Thanks all for your input.
My only workaround was to check programmatically all those input
and set them with a setCustomValidity()
Too bad there isn't a method to relaunch the validity across all the page :/
Cheers
Thank @daisyKutter@lemmy.ml
it's look like that that code only verify the form when submitting.. I need to check the validity when the element has been loaded.
btw checkValidity()
do not solve this issue as it return True
when the length is longer than maxlength
! O_o I guess this is were is lying the "bug"
My two cent
For me this is a huge flaw ! I don't understand how we (dev) are we still developing on "standard" that are so f*ck-up..
Thank you @coffee_poops@sh.itjust.works that exactly my question.. how can I trigger the validation process again ?
It will not be digest to send all what I use for you to see it (it will lead to TL;DR)
but here an elements (loaded with XHR that give the problem
So normally this element should be invalid and a CSS selector of :invalid
should match. but it's not the case because the browser seem to not run the validation check on loaded elements... !?
if we edit manually the input , for example removing one character then the validation process kick-in and the CSS selector work etc..
~~ cross-posted from: https://programming.dev/post/9179830 ~~
> Hi,
>
> I'm loading some content with XHR (aka Ajax) the loaded input
elements that have a invalid value
assigned are not checked trough the validation process.
>
> so the CSS
styling with :invalid
is for example not working etc..
>
> is there a way to force the validation process on those elements ?
>
> edit: Browser is Firefox
>
> Thanks.
cross-posted from: https://programming.dev/post/7667731
> Hi, > > As CSS do not have a color-overlay[^1] filter. > > There is some heavy work around: > > https://isotropic.co/tool/hex-color-to-css-filter/ > > that use a combination of CSS filter to target the desired color... > > Those online calculators are neat, but I would like an offline version, in case the provided one become inaccessible. > > I've downloaded the zip of https://codepen.io/sosuke/pen/Pjoqqp > > But it doesn't work locally.. :/ > > So I would like to know, if someone know one in đ Python ? or how can I make one then ? > > Or if someone know another way to have the color-overlay[^1] effect in html\css, I'm all ears ! > > Thank. > > > [^1]: To apply like in Photoshop a color on the shape of the image (so not on the parts that have transparency.